summary refs log tree commit diff
path: root/tests/handlers/test_oidc.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-04-16 12:33:45 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-04-16 12:33:45 +0100
commit93db8f1992887d0e01e31331a1ee2ad030d62b87 (patch)
treea94c08060fb4e07bf37ddc97234152f144db9afb /tests/handlers/test_oidc.py
parentPort "Allow providing credentials to HTTPS_PROXY (#9657)" from mainline (#95) (diff)
parentMerge branch 'release-v1.24.0' into develop (diff)
downloadsynapse-93db8f1992887d0e01e31331a1ee2ad030d62b87.tar.xz
Merge commit 'cf7d3c90d' into dinsic
Diffstat (limited to 'tests/handlers/test_oidc.py')
-rw-r--r--tests/handlers/test_oidc.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/tests/handlers/test_oidc.py b/tests/handlers/test_oidc.py

index a308c46da9..1d99a45436 100644 --- a/tests/handlers/test_oidc.py +++ b/tests/handlers/test_oidc.py
@@ -17,30 +17,15 @@ from urllib.parse import parse_qs, urlparse from mock import Mock, patch -import attr import pymacaroons -from twisted.python.failure import Failure -from twisted.web._newclient import ResponseDone - from synapse.handlers.oidc_handler import OidcError, OidcMappingProvider from synapse.handlers.sso import MappingException from synapse.types import UserID +from tests.test_utils import FakeResponse from tests.unittest import HomeserverTestCase, override_config - -@attr.s -class FakeResponse: - code = attr.ib() - body = attr.ib() - phrase = attr.ib() - - def deliverBody(self, protocol): - protocol.dataReceived(self.body) - protocol.connectionLost(Failure(ResponseDone())) - - # These are a few constants that are used as config parameters in the tests. ISSUER = "https://issuer/" CLIENT_ID = "test-client-id"