Use literals in place of HTTPStatus constants in tests (#13463)

This commit is contained in:
Dirk Klimpel 2022-08-05 16:59:09 +02:00 committed by GitHub
parent 3d2cabf966
commit e2ed1b7155
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 172 additions and 191 deletions

View file

@ -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"]