mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 16:24:48 -04:00
Use literals in place of HTTPStatus
constants in tests (#13469)
This commit is contained in:
parent
7a19995120
commit
c97042f7ee
13 changed files with 329 additions and 331 deletions
|
@ -50,18 +50,18 @@ class UsernameAvailableTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
def test_username_available(self) -> None:
|
||||
"""
|
||||
The endpoint should return a HTTPStatus.OK response if the username does not exist
|
||||
The endpoint should return a 200 response if the username does not exist
|
||||
"""
|
||||
|
||||
url = "%s?username=%s" % (self.url, "allowed")
|
||||
channel = self.make_request("GET", url, access_token=self.admin_user_tok)
|
||||
|
||||
self.assertEqual(HTTPStatus.OK, channel.code, msg=channel.json_body)
|
||||
self.assertEqual(200, channel.code, msg=channel.json_body)
|
||||
self.assertTrue(channel.json_body["available"])
|
||||
|
||||
def test_username_unavailable(self) -> None:
|
||||
"""
|
||||
The endpoint should return a HTTPStatus.OK response if the username does not exist
|
||||
The endpoint should return a 200 response if the username does not exist
|
||||
"""
|
||||
|
||||
url = "%s?username=%s" % (self.url, "disallowed")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue