diff options
author | Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> | 2022-07-15 21:31:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-15 19:31:27 +0000 |
commit | 96cf81e312407f0caba1b45ba9899906b1dcc098 (patch) | |
tree | a075e04df53217584ee1819ef1922767bb4a33d4 /tests/federation/test_complexity.py | |
parent | Provide more info why we don't have any thumbnails to serve (#13038) (diff) | |
download | synapse-96cf81e312407f0caba1b45ba9899906b1dcc098.tar.xz |
Use HTTPStatus constants in place of literals in tests. (#13297)
Diffstat (limited to 'tests/federation/test_complexity.py')
-rw-r--r-- | tests/federation/test_complexity.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/federation/test_complexity.py b/tests/federation/test_complexity.py index 9f1115dd23..c6dd99316a 100644 --- a/tests/federation/test_complexity.py +++ b/tests/federation/test_complexity.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +from http import HTTPStatus from unittest.mock import Mock from synapse.api.errors import Codes, SynapseError @@ -50,7 +51,7 @@ class RoomComplexityTests(unittest.FederatingHomeserverTestCase): channel = self.make_signed_federation_request( "GET", "/_matrix/federation/unstable/rooms/%s/complexity" % (room_1,) ) - self.assertEqual(200, channel.code) + self.assertEqual(HTTPStatus.OK, channel.code) complexity = channel.json_body["v1"] self.assertTrue(complexity > 0, complexity) @@ -62,7 +63,7 @@ class RoomComplexityTests(unittest.FederatingHomeserverTestCase): channel = self.make_signed_federation_request( "GET", "/_matrix/federation/unstable/rooms/%s/complexity" % (room_1,) ) - self.assertEqual(200, channel.code) + self.assertEqual(HTTPStatus.OK, channel.code) complexity = channel.json_body["v1"] self.assertEqual(complexity, 1.23) |