Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
newsfile and linter
Browse files Browse the repository at this point in the history
  • Loading branch information
dklimpel committed Nov 29, 2021
1 parent e517840 commit 6fb04c2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/11455.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Convert status codes to `HTTPStatus` in `synapse.rest.admin`.
1 change: 1 addition & 0 deletions tests/rest/admin/test_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import json
import os
from http import HTTPStatus

from parameterized import parameterized

Expand Down
4 changes: 1 addition & 3 deletions tests/rest/admin/test_registration_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,7 @@ def test_create_token_already_exists(self):
data,
access_token=self.admin_user_tok,
)
self.assertEqual(
HTTPStatus.BAD_REQUEST, channel2.code, msg=channel2.json_body
)
self.assertEqual(HTTPStatus.BAD_REQUEST, channel2.code, msg=channel2.json_body)
self.assertEqual(channel2.json_body["errcode"], Codes.INVALID_PARAM)

def test_create_unable_to_generate_token(self):
Expand Down
1 change: 1 addition & 0 deletions tests/rest/admin/test_server_notice.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from http import HTTPStatus
from typing import List

import synapse.rest.admin
Expand Down
2 changes: 2 additions & 0 deletions tests/rest/admin/test_username_available.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from http import HTTPStatus

import synapse.rest.admin
from synapse.api.errors import Codes, SynapseError
from synapse.rest.client import login
Expand Down

0 comments on commit 6fb04c2

Please sign in to comment.