mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-07 01:54:57 -04:00
Use literals in place of HTTPStatus
constants in tests (#13469)
This commit is contained in:
parent
7a19995120
commit
c97042f7ee
13 changed files with 329 additions and 331 deletions
|
@ -197,7 +197,7 @@ class ServerNoticeTestCase(unittest.HomeserverTestCase):
|
|||
"content": {"msgtype": "m.text", "body": "test msg one"},
|
||||
},
|
||||
)
|
||||
self.assertEqual(HTTPStatus.OK, channel.code, msg=channel.json_body)
|
||||
self.assertEqual(200, channel.code, msg=channel.json_body)
|
||||
|
||||
# user has one invite
|
||||
invited_rooms = self._check_invite_and_join_status(self.other_user, 1, 0)
|
||||
|
@ -226,7 +226,7 @@ class ServerNoticeTestCase(unittest.HomeserverTestCase):
|
|||
"content": {"msgtype": "m.text", "body": "test msg two"},
|
||||
},
|
||||
)
|
||||
self.assertEqual(HTTPStatus.OK, channel.code, msg=channel.json_body)
|
||||
self.assertEqual(200, channel.code, msg=channel.json_body)
|
||||
|
||||
# user has no new invites or memberships
|
||||
self._check_invite_and_join_status(self.other_user, 0, 1)
|
||||
|
@ -260,7 +260,7 @@ class ServerNoticeTestCase(unittest.HomeserverTestCase):
|
|||
"content": {"msgtype": "m.text", "body": "test msg one"},
|
||||
},
|
||||
)
|
||||
self.assertEqual(HTTPStatus.OK, channel.code, msg=channel.json_body)
|
||||
self.assertEqual(200, channel.code, msg=channel.json_body)
|
||||
|
||||
# user has one invite
|
||||
invited_rooms = self._check_invite_and_join_status(self.other_user, 1, 0)
|
||||
|
@ -301,7 +301,7 @@ class ServerNoticeTestCase(unittest.HomeserverTestCase):
|
|||
"content": {"msgtype": "m.text", "body": "test msg two"},
|
||||
},
|
||||
)
|
||||
self.assertEqual(HTTPStatus.OK, channel.code, msg=channel.json_body)
|
||||
self.assertEqual(200, channel.code, msg=channel.json_body)
|
||||
|
||||
# user has one invite
|
||||
invited_rooms = self._check_invite_and_join_status(self.other_user, 1, 0)
|
||||
|
@ -341,7 +341,7 @@ class ServerNoticeTestCase(unittest.HomeserverTestCase):
|
|||
"content": {"msgtype": "m.text", "body": "test msg one"},
|
||||
},
|
||||
)
|
||||
self.assertEqual(HTTPStatus.OK, channel.code, msg=channel.json_body)
|
||||
self.assertEqual(200, channel.code, msg=channel.json_body)
|
||||
|
||||
# user has one invite
|
||||
invited_rooms = self._check_invite_and_join_status(self.other_user, 1, 0)
|
||||
|
@ -388,7 +388,7 @@ class ServerNoticeTestCase(unittest.HomeserverTestCase):
|
|||
"content": {"msgtype": "m.text", "body": "test msg two"},
|
||||
},
|
||||
)
|
||||
self.assertEqual(HTTPStatus.OK, channel.code, msg=channel.json_body)
|
||||
self.assertEqual(200, channel.code, msg=channel.json_body)
|
||||
|
||||
# user has one invite
|
||||
invited_rooms = self._check_invite_and_join_status(self.other_user, 1, 0)
|
||||
|
@ -538,7 +538,7 @@ class ServerNoticeTestCase(unittest.HomeserverTestCase):
|
|||
channel = self.make_request(
|
||||
"GET", "/_matrix/client/r0/sync", access_token=token
|
||||
)
|
||||
self.assertEqual(channel.code, HTTPStatus.OK)
|
||||
self.assertEqual(channel.code, 200)
|
||||
|
||||
# Get the messages
|
||||
room = channel.json_body["rooms"]["join"][room_id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue