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/transport | |
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/transport')
-rw-r--r-- | tests/federation/transport/test_knocking.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/federation/transport/test_knocking.py b/tests/federation/transport/test_knocking.py index d21c11b716..0d048207b7 100644 --- a/tests/federation/transport/test_knocking.py +++ b/tests/federation/transport/test_knocking.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. from collections import OrderedDict +from http import HTTPStatus from typing import Dict, List from synapse.api.constants import EventTypes, JoinRules, Membership @@ -255,7 +256,7 @@ class FederationKnockingTestCase( RoomVersions.V7.identifier, ), ) - self.assertEqual(200, channel.code, channel.result) + self.assertEqual(HTTPStatus.OK, channel.code, channel.result) # Note: We don't expect the knock membership event to be sent over federation as # part of the stripped room state, as the knocking homeserver already has that @@ -293,7 +294,7 @@ class FederationKnockingTestCase( % (room_id, signed_knock_event.event_id), signed_knock_event_json, ) - self.assertEqual(200, channel.code, channel.result) + self.assertEqual(HTTPStatus.OK, channel.code, channel.result) # Check that we got the stripped room state in return room_state_events = channel.json_body["knock_state_events"] |