Fix flake8 issues

Signed-off-by: Jason Robinson <jasonr@matrix.org>
This commit is contained in:
Jason Robinson 2019-01-23 10:53:48 +02:00
parent 1838ef1ac3
commit 6f680241bd
3 changed files with 13 additions and 4 deletions

View File

@ -92,7 +92,10 @@ class FederationReaderServer(HomeServer):
# is not specified since federation resource includes openid
# resource.
resources.update({
FEDERATION_PREFIX: TransportLayerServer(self, servlet_groups=["openid"]),
FEDERATION_PREFIX: TransportLayerServer(
self,
servlet_groups=["openid"],
),
})
root_resource = create_resource_tree(resources, NoResource())

View File

@ -330,7 +330,7 @@ class ServerConfig(Config):
- names: [federation] # Federation APIs
compress: false
# # If federation is disabled synapse can still expose the open ID endpoint
# # to allow integrations to authenticate users
# - names: [openid]

View File

@ -61,7 +61,10 @@ class FederationReaderOpenIDListenerTests(HomeserverTestCase):
return
raise
request, channel = self.make_request("GET", "/_matrix/federation/v1/openid/userinfo")
request, channel = self.make_request(
"GET",
"/_matrix/federation/v1/openid/userinfo",
)
self.render(request)
self.assertEqual(channel.code, 401)
@ -107,7 +110,10 @@ class SynapseHomeserverOpenIDListenerTests(HomeserverTestCase):
return
raise
request, channel = self.make_request("GET", "/_matrix/federation/v1/openid/userinfo")
request, channel = self.make_request(
"GET",
"/_matrix/federation/v1/openid/userinfo",
)
self.render(request)
self.assertEqual(channel.code, 401)