diff options
author | Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> | 2022-08-09 15:56:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-09 14:56:43 +0100 |
commit | 1595052b2681fb86c1c1b9a6028c1bc0d38a2e4b (patch) | |
tree | b535cd862d132f7e75303898f50b9f6ee69076b1 /tests/rest/admin/test_admin.py | |
parent | Merge branch 'release-v1.65' into develop (diff) | |
download | synapse-1595052b2681fb86c1c1b9a6028c1bc0d38a2e4b.tar.xz |
Use literals in place of `HTTPStatus` constants in tests (#13479)
Replace - `HTTPStatus.NOT_FOUND` - `HTTPStatus.FORBIDDEN` - `HTTPStatus.UNAUTHORIZED` - `HTTPStatus.CONFLICT` - `HTTPStatus.CREATED` Signed-off-by: Dirk Klimpel <dirk@klimpel.org>
Diffstat (limited to 'tests/rest/admin/test_admin.py')
-rw-r--r-- | tests/rest/admin/test_admin.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/rest/admin/test_admin.py b/tests/rest/admin/test_admin.py index 06e74d5e58..a8f6436836 100644 --- a/tests/rest/admin/test_admin.py +++ b/tests/rest/admin/test_admin.py @@ -13,7 +13,6 @@ # limitations under the License. import urllib.parse -from http import HTTPStatus from parameterized import parameterized @@ -79,10 +78,10 @@ class QuarantineMediaTestCase(unittest.HomeserverTestCase): # Should be quarantined self.assertEqual( - HTTPStatus.NOT_FOUND, + 404, channel.code, msg=( - "Expected to receive a HTTPStatus.NOT_FOUND on accessing quarantined media: %s" + "Expected to receive a 404 on accessing quarantined media: %s" % server_and_media_id ), ) @@ -107,7 +106,7 @@ class QuarantineMediaTestCase(unittest.HomeserverTestCase): # Expect a forbidden error self.assertEqual( - HTTPStatus.FORBIDDEN, + 403, channel.code, msg="Expected forbidden on quarantining media as a non-admin", ) |