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_statistics.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_statistics.py')
-rw-r--r-- | tests/rest/admin/test_statistics.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/rest/admin/test_statistics.py b/tests/rest/admin/test_statistics.py index baed27a815..3a8982afea 100644 --- a/tests/rest/admin/test_statistics.py +++ b/tests/rest/admin/test_statistics.py @@ -52,7 +52,7 @@ class UserMediaStatisticsTestCase(unittest.HomeserverTestCase): channel = self.make_request("GET", self.url, b"{}") self.assertEqual( - HTTPStatus.UNAUTHORIZED, + 401, channel.code, msg=channel.json_body, ) @@ -60,7 +60,7 @@ class UserMediaStatisticsTestCase(unittest.HomeserverTestCase): def test_requester_is_no_admin(self) -> None: """ - If the user is not a server admin, an error HTTPStatus.FORBIDDEN is returned. + If the user is not a server admin, an error 403 is returned. """ channel = self.make_request( "GET", @@ -70,7 +70,7 @@ class UserMediaStatisticsTestCase(unittest.HomeserverTestCase): ) self.assertEqual( - HTTPStatus.FORBIDDEN, + 403, channel.code, msg=channel.json_body, ) |