summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-05-22 10:43:23 +0100
committerBrendan Abolivier <babolivier@matrix.org>2019-05-22 10:43:23 +0100
commit4a9eba957680fc32582687f399626f9ab7b55755 (patch)
tree1e70aa0a1c7435bb67225850ea0b6e914d4a5d72
parentImprove documentation on generated configuration (diff)
downloadsynapse-4a9eba957680fc32582687f399626f9ab7b55755.tar.xz
Test whole dict instead of individual fields
-rw-r--r--tests/rest/client/v2_alpha/test_password_policy.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/rest/client/v2_alpha/test_password_policy.py b/tests/rest/client/v2_alpha/test_password_policy.py
index c02d9dce0e..17c22fe751 100644
--- a/tests/rest/client/v2_alpha/test_password_policy.py
+++ b/tests/rest/client/v2_alpha/test_password_policy.py
@@ -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"})