mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 16:34:49 -04:00
Neaten more of the storage layer tests with assertObjectHasAttributes; more standardisation on test layout
This commit is contained in:
parent
b588ce920d
commit
bcf5121937
3 changed files with 22 additions and 20 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue