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

Commit 77a6ee6

Browse files
committed
Lint
1 parent 17f73cd commit 77a6ee6

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

synapse/rest/client/login_token_request.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ class LoginTokenRequestServlet(RestServlet):
4949
"""
5050

5151
PATTERNS = [
52-
*client_patterns("/login/get_token$", releases=["v1"], v1=False, unstable=False),
52+
*client_patterns(
53+
"/login/get_token$", releases=["v1"], v1=False, unstable=False
54+
),
5355
# TODO: this is no longer needed once unstable MSC3882 does not need to be supported:
5456
*client_patterns(
5557
"/org.matrix.msc3882/login/token$", releases=[], v1=False, unstable=True

tests/rest/client/test_login_token_request.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class LoginTokenRequestServletTestCase(unittest.HomeserverTestCase):
3030
login.register_servlets,
3131
admin.register_servlets,
3232
login_token_request.register_servlets,
33-
versions.register_servlets, # TODO: remove once unstable revision 0 support is removed
33+
versions.register_servlets, # TODO: remove once unstable revision 0 support is removed
3434
]
3535

3636
def make_homeserver(self, reactor: MemoryReactor, clock: Clock) -> HomeServer:
@@ -146,14 +146,23 @@ def test_unstable_support(self) -> None:
146146
# TODO: remove support for unstable MSC3882 is no longer needed
147147

148148
# check feature is advertised in versions response:
149-
channel = self.make_request("GET", "/_matrix/client/versions", {}, access_token=None)
149+
channel = self.make_request(
150+
"GET", "/_matrix/client/versions", {}, access_token=None
151+
)
150152
self.assertEqual(channel.code, 200)
151-
self.assertEqual(channel.json_body["unstable_features"]["org.matrix.msc3882"], True)
153+
self.assertEqual(
154+
channel.json_body["unstable_features"]["org.matrix.msc3882"], True
155+
)
152156

153157
self.register_user(self.user, self.password)
154158
token = self.login(self.user, self.password)
155159

156160
# check feature is available via the unstable endpoint and returns an expires_in value in seconds
157-
channel = self.make_request("POST", "/_matrix/client/unstable/org.matrix.msc3882/login/token", {}, access_token=token)
161+
channel = self.make_request(
162+
"POST",
163+
"/_matrix/client/unstable/org.matrix.msc3882/login/token",
164+
{},
165+
access_token=token,
166+
)
158167
self.assertEqual(channel.code, 200)
159168
self.assertEqual(channel.json_body["expires_in"], 15)

0 commit comments

Comments
 (0)