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

Commit 6fb04c2

Browse files
committed
newsfile and linter
1 parent e517840 commit 6fb04c2

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

changelog.d/11455.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Convert status codes to `HTTPStatus` in `synapse.rest.admin`.

tests/rest/admin/test_media.py

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import json
1717
import os
18+
from http import HTTPStatus
1819

1920
from parameterized import parameterized
2021

tests/rest/admin/test_registration_tokens.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,7 @@ def test_create_token_already_exists(self):
205205
data,
206206
access_token=self.admin_user_tok,
207207
)
208-
self.assertEqual(
209-
HTTPStatus.BAD_REQUEST, channel2.code, msg=channel2.json_body
210-
)
208+
self.assertEqual(HTTPStatus.BAD_REQUEST, channel2.code, msg=channel2.json_body)
211209
self.assertEqual(channel2.json_body["errcode"], Codes.INVALID_PARAM)
212210

213211
def test_create_unable_to_generate_token(self):

tests/rest/admin/test_server_notice.py

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from http import HTTPStatus
1516
from typing import List
1617

1718
import synapse.rest.admin

tests/rest/admin/test_username_available.py

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from http import HTTPStatus
16+
1517
import synapse.rest.admin
1618
from synapse.api.errors import Codes, SynapseError
1719
from synapse.rest.client import login

0 commit comments

Comments
 (0)