mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-14 12:55:23 -04:00
Use literals in place of HTTPStatus
constants in tests (#13463)
This commit is contained in:
parent
3d2cabf966
commit
e2ed1b7155
18 changed files with 172 additions and 191 deletions
|
@ -76,12 +76,12 @@ class RedactionsTestCase(HomeserverTestCase):
|
|||
path = "/_matrix/client/r0/rooms/%s/redact/%s" % (room_id, event_id)
|
||||
|
||||
channel = self.make_request("POST", path, content={}, access_token=access_token)
|
||||
self.assertEqual(int(channel.result["code"]), expect_code)
|
||||
self.assertEqual(channel.code, expect_code)
|
||||
return channel.json_body
|
||||
|
||||
def _sync_room_timeline(self, access_token: str, room_id: str) -> List[JsonDict]:
|
||||
channel = self.make_request("GET", "sync", access_token=self.mod_access_token)
|
||||
self.assertEqual(channel.result["code"], b"200")
|
||||
self.assertEqual(channel.code, 200)
|
||||
room_sync = channel.json_body["rooms"]["join"][room_id]
|
||||
return room_sync["timeline"]["events"]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue