mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-22 15:50:38 -04:00
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>
This commit is contained in:
parent
54fb517c28
commit
1595052b26
12 changed files with 141 additions and 141 deletions
|
@ -51,7 +51,7 @@ class BackgroundUpdatesTestCase(unittest.HomeserverTestCase):
|
|||
)
|
||||
def test_requester_is_no_admin(self, method: str, url: str) -> 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.
|
||||
"""
|
||||
|
||||
self.register_user("user", "pass", admin=False)
|
||||
|
@ -64,7 +64,7 @@ class BackgroundUpdatesTestCase(unittest.HomeserverTestCase):
|
|||
access_token=other_user_tok,
|
||||
)
|
||||
|
||||
self.assertEqual(HTTPStatus.FORBIDDEN, channel.code, msg=channel.json_body)
|
||||
self.assertEqual(403, channel.code, msg=channel.json_body)
|
||||
self.assertEqual(Codes.FORBIDDEN, channel.json_body["errcode"])
|
||||
|
||||
def test_invalid_parameter(self) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue