summary refs log tree commit diff
path: root/tests/storage/test_directory.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/storage/test_directory.py')
-rw-r--r--tests/storage/test_directory.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/storage/test_directory.py b/tests/storage/test_directory.py
index 9a80bf6c04..7e8e7e1e83 100644
--- a/tests/storage/test_directory.py
+++ b/tests/storage/test_directory.py
@@ -47,9 +47,10 @@ class DirectoryStoreTestCase(unittest.TestCase):
             servers=["test"],
         )
 
-        aliases = yield self.store.get_aliases_for_room(self.room.to_string())
-
-        self.assertEquals(["#my-room:test"], aliases)
+        self.assertEquals(
+            ["#my-room:test"],
+            (yield self.store.get_aliases_for_room(self.room.to_string()))
+        )
 
     @defer.inlineCallbacks
     def test_alias_to_room(self):
@@ -59,9 +60,9 @@ class DirectoryStoreTestCase(unittest.TestCase):
             servers=["test"],
         )
 
-        mapping = yield self.store.get_association_from_room_alias(
-            self.alias
-        )
 
-        self.assertEquals(self.room.to_string(), mapping.room_id)
-        self.assertEquals(["test"], mapping.servers)
+        self.assertObjectHasAttributes(
+            {"room_id": self.room.to_string(),
+             "servers": ["test"]},
+            (yield self.store.get_association_from_room_alias(self.alias))
+        )