diff options
author | Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> | 2022-08-05 16:59:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-05 16:59:09 +0200 |
commit | e2ed1b7155bbd38d4a2752073056c112464b3644 (patch) | |
tree | 72c0dd52bb339199a559726aff40a7633403e82b /tests/test_terms_auth.py | |
parent | Mark token-authenticaticated-registration API as not-experimental (#11897) (diff) | |
download | synapse-e2ed1b7155bbd38d4a2752073056c112464b3644.tar.xz |
Use literals in place of `HTTPStatus` constants in tests (#13463)
Diffstat (limited to 'tests/test_terms_auth.py')
-rw-r--r-- | tests/test_terms_auth.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_terms_auth.py b/tests/test_terms_auth.py index d3c13cf14c..abd7459a8c 100644 --- a/tests/test_terms_auth.py +++ b/tests/test_terms_auth.py @@ -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) |