From 18071156e49d49847b87a418db09d04346ee9b16 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 12 Jun 2020 13:44:53 +0100 Subject: [PATCH] Remove placeholders/dummy classes for supporting identifiers in existing tests --- tests/rest/client/v1/test_login.py | 4 +--- tests/rest/client/v2_alpha/test_auth.py | 8 -------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/rest/client/v1/test_login.py b/tests/rest/client/v1/test_login.py index 9033f09fd2e3..c6d8f24fe924 100644 --- a/tests/rest/client/v1/test_login.py +++ b/tests/rest/client/v1/test_login.py @@ -273,9 +273,7 @@ def _delete_device(self, access_token, user_id, password, device_id): auth = { "type": "m.login.password", - # https://github.com/matrix-org/synapse/issues/5665 - # "identifier": {"type": "m.id.user", "user": user_id}, - "user": user_id, + "identifier": {"type": "m.id.user", "user": user_id}, "password": password, "session": channel.json_body["session"], } diff --git a/tests/rest/client/v2_alpha/test_auth.py b/tests/rest/client/v2_alpha/test_auth.py index 293ccfba2bb1..8f97dd0dd216 100644 --- a/tests/rest/client/v2_alpha/test_auth.py +++ b/tests/rest/client/v2_alpha/test_auth.py @@ -38,11 +38,6 @@ def check_auth(self, authdict, clientip): return succeed(True) -class DummyPasswordChecker(UserInteractiveAuthChecker): - def check_auth(self, authdict, clientip): - return succeed(authdict["identifier"]["user"]) - - class FallbackAuthTests(unittest.HomeserverTestCase): servlets = [ @@ -166,9 +161,6 @@ class UIAuthTests(unittest.HomeserverTestCase): ] def prepare(self, reactor, clock, hs): - auth_handler = hs.get_auth_handler() - auth_handler.checkers[LoginType.PASSWORD] = DummyPasswordChecker(hs) - self.user_pass = "pass" self.user = self.register_user("test", self.user_pass) self.user_tok = self.login("test", self.user_pass)