mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:26:06 -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
|
@ -53,7 +53,7 @@ class TermsTestCase(unittest.HomeserverTestCase):
|
|||
request_data = {"username": "kermit", "password": "monkey"}
|
||||
channel = self.make_request(b"POST", self.url, request_data)
|
||||
|
||||
self.assertEqual(channel.result["code"], b"401", channel.result)
|
||||
self.assertEqual(channel.code, 401, channel.result)
|
||||
|
||||
self.assertTrue(channel.json_body is not None)
|
||||
self.assertIsInstance(channel.json_body["session"], str)
|
||||
|
@ -96,7 +96,7 @@ class TermsTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# We don't bother checking that the response is correct - we'll leave that to
|
||||
# other tests. We just want to make sure we're on the right path.
|
||||
self.assertEqual(channel.result["code"], b"401", channel.result)
|
||||
self.assertEqual(channel.code, 401, channel.result)
|
||||
|
||||
# Finish the UI auth for terms
|
||||
request_data = {
|
||||
|
@ -112,7 +112,7 @@ class TermsTestCase(unittest.HomeserverTestCase):
|
|||
# We're interested in getting a response that looks like a successful
|
||||
# registration, not so much that the details are exactly what we want.
|
||||
|
||||
self.assertEqual(channel.result["code"], b"200", channel.result)
|
||||
self.assertEqual(channel.code, 200, channel.result)
|
||||
|
||||
self.assertTrue(channel.json_body is not None)
|
||||
self.assertIsInstance(channel.json_body["user_id"], str)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue