diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-17 16:58:59 +0100 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-17 16:58:59 +0100 |
commit | bcf512193705a0aaca2da3bbfd62ce6f4cb65980 (patch) | |
tree | 31d74cbe82b3ba570338b680a0c28d98d94b6335 /tests/storage/test_room.py | |
parent | Unit tests for (some) room events via the RoomStore (diff) | |
download | synapse-bcf512193705a0aaca2da3bbfd62ce6f4cb65980.tar.xz |
Neaten more of the storage layer tests with assertObjectHasAttributes; more standardisation on test layout
Diffstat (limited to 'tests/storage/test_room.py')
-rw-r--r-- | tests/storage/test_room.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/storage/test_room.py b/tests/storage/test_room.py index 9979be2f65..369a73d917 100644 --- a/tests/storage/test_room.py +++ b/tests/storage/test_room.py @@ -51,13 +51,11 @@ class RoomStoreTestCase(unittest.TestCase): @defer.inlineCallbacks def test_get_room(self): - room = yield self.store.get_room(self.room.to_string()) - self.assertObjectHasAttributes( {"room_id": self.room.to_string(), "creator": self.u_creator.to_string(), "is_public": True}, - room + (yield self.store.get_room(self.room.to_string())) ) @defer.inlineCallbacks @@ -66,9 +64,10 @@ class RoomStoreTestCase(unittest.TestCase): visibility=False ) - room = yield self.store.get_room(self.room.to_string()) - - self.assertFalse(room.is_public) + self.assertObjectHasAttributes( + {"is_public": False}, + (yield self.store.get_room(self.room.to_string())) + ) @defer.inlineCallbacks def test_get_rooms(self): |