mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-04 16:10:06 -04:00
Create a PasswordProvider
wrapper object (#8849)
The idea here is to abstract out all the conditional code which tests which methods a given password provider has, to provide a consistent interface.
This commit is contained in:
parent
edb3d3f827
commit
d3ed93504b
3 changed files with 152 additions and 57 deletions
|
@ -266,8 +266,9 @@ class PasswordAuthProviderTests(unittest.HomeserverTestCase):
|
|||
# first delete should give a 401
|
||||
channel = self._delete_device(tok1, "dev2")
|
||||
self.assertEqual(channel.code, 401)
|
||||
# there are no valid flows here!
|
||||
self.assertEqual(channel.json_body["flows"], [])
|
||||
# m.login.password UIA is permitted because the auth provider allows it,
|
||||
# even though the localdb does not.
|
||||
self.assertEqual(channel.json_body["flows"], [{"stages": ["m.login.password"]}])
|
||||
session = channel.json_body["session"]
|
||||
mock_password_provider.check_password.assert_not_called()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue