mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Test whole dict instead of individual fields
This commit is contained in:
parent
7dfc3c327c
commit
4a9eba9576
@ -74,11 +74,13 @@ class PasswordPolicyTestCase(unittest.HomeserverTestCase):
|
||||
self.render(request)
|
||||
|
||||
self.assertEqual(channel.code, 200, channel.result)
|
||||
self.assertEqual(channel.json_body["m.minimum_length"], 10, channel.result)
|
||||
self.assertEqual(channel.json_body["m.require_digit"], True, channel.result)
|
||||
self.assertEqual(channel.json_body["m.require_symbol"], True, channel.result)
|
||||
self.assertEqual(channel.json_body["m.require_lowercase"], True, channel.result)
|
||||
self.assertEqual(channel.json_body["m.require_uppercase"], True, channel.result)
|
||||
self.assertEqual(channel.json_body, {
|
||||
"m.minimum_length": 10,
|
||||
"m.require_digit": True,
|
||||
"m.require_symbol": True,
|
||||
"m.require_lowercase": True,
|
||||
"m.require_uppercase": True,
|
||||
}, channel.result)
|
||||
|
||||
def test_password_too_short(self):
|
||||
request_data = json.dumps({"username": "kermit", "password": "shorty"})
|
||||
|
Loading…
Reference in New Issue
Block a user