diff options
author | Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> | 2022-08-10 20:01:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-10 11:01:12 -0700 |
commit | 2281427175e4c93a30c39607fb4ac23c2a1f399f (patch) | |
tree | 8126073e8781149e422e51ac63e58364de1936e5 /tests/rest/admin/test_background_updates.py | |
parent | Add some miscellaneous comments around sync (#13474) (diff) | |
download | synapse-2281427175e4c93a30c39607fb4ac23c2a1f399f.tar.xz |
Use literals in place of `HTTPStatus` constants in tests (#13488)
* Use literals in place of `HTTPStatus` constants in tests * newsfile * code style * code style
Diffstat (limited to 'tests/rest/admin/test_background_updates.py')
-rw-r--r-- | tests/rest/admin/test_background_updates.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/rest/admin/test_background_updates.py b/tests/rest/admin/test_background_updates.py index 7cd8b52f02..d507a3af8d 100644 --- a/tests/rest/admin/test_background_updates.py +++ b/tests/rest/admin/test_background_updates.py @@ -11,7 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from http import HTTPStatus from typing import Collection from parameterized import parameterized @@ -81,7 +80,7 @@ class BackgroundUpdatesTestCase(unittest.HomeserverTestCase): access_token=self.admin_user_tok, ) - self.assertEqual(HTTPStatus.BAD_REQUEST, channel.code, msg=channel.json_body) + self.assertEqual(400, channel.code, msg=channel.json_body) self.assertEqual(Codes.MISSING_PARAM, channel.json_body["errcode"]) # job_name invalid @@ -92,7 +91,7 @@ class BackgroundUpdatesTestCase(unittest.HomeserverTestCase): access_token=self.admin_user_tok, ) - self.assertEqual(HTTPStatus.BAD_REQUEST, channel.code, msg=channel.json_body) + self.assertEqual(400, channel.code, msg=channel.json_body) self.assertEqual(Codes.UNKNOWN, channel.json_body["errcode"]) def _register_bg_update(self) -> None: @@ -365,4 +364,4 @@ class BackgroundUpdatesTestCase(unittest.HomeserverTestCase): access_token=self.admin_user_tok, ) - self.assertEqual(HTTPStatus.BAD_REQUEST, channel.code, msg=channel.json_body) + self.assertEqual(400, channel.code, msg=channel.json_body) |