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

Commit

Permalink
Remove placeholders/dummy classes for supporting identifiers in exist…
Browse files Browse the repository at this point in the history
…ing tests
  • Loading branch information
anoadragon453 committed Jun 12, 2020
1 parent cb64c95 commit 1807115
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
4 changes: 1 addition & 3 deletions tests/rest/client/v1/test_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
}
Expand Down
8 changes: 0 additions & 8 deletions tests/rest/client/v2_alpha/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 1807115

Please sign in to comment.