mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 19:44:51 -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
|
@ -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",
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue