Enforce order also on multiple room descs

This commit is contained in:
Griatch 2023-06-08 15:23:57 +02:00
parent 2ac1f88ad9
commit 18569482f1
3 changed files with 6 additions and 6 deletions

View file

@ -345,7 +345,7 @@ class ExtendedRoom(DefaultRoom):
**{None: self.db.desc or ""},
**{
attr.key[5:]: attr.value
for attr in self.db_attributes.filter(db_key__startswith="desc_")
for attr in self.db_attributes.filter(db_key__startswith="desc_").order_by("db_key")
},
}

View file

@ -219,12 +219,12 @@ Base room description.
f"""
Room Room(#{self.room1.id}) Season: autumn. Time: afternoon. States: None
Room state spring:
Spring description.
Room state burning:
Burning description.
Room state spring:
Spring description.
Room state (default) (active):
Base room description.
""".strip(),

View file

@ -370,8 +370,8 @@ class TestProperties(EvenniaTestCase):
# add extra tag to category
obj.tags.add("category_tag2", category="tagcategory1")
self.assertEqual(
obj.tags.get(category="tagcategory1"),
["category_tag1", "category_tag2"],
set(obj.tags.get(category="tagcategory1")),
set(["category_tag1", "category_tag2"]),
)
self.assertEqual(set(obj.tagcategory1), set(["category_tag1", "category_tag2"]))