summary refs log tree commit diff
path: root/tests/rest/client/v1/test_admin.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-08-17 14:15:48 +0100
committerErik Johnston <erik@matrix.org>2018-08-17 14:15:48 +0100
commit782689bd408b7d291fef913a318e1a6dda6f13e1 (patch)
tree50502568cd0b9966e8c42d48d8db5d6cdf73fe1c /tests/rest/client/v1/test_admin.py
parentSplit ProfileHandler into master and worker (diff)
parentMerge pull request #3708 from matrix-org/neilj/resource_Limit_block_event_cre... (diff)
downloadsynapse-782689bd408b7d291fef913a318e1a6dda6f13e1.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_profiles
Diffstat (limited to 'tests/rest/client/v1/test_admin.py')
-rw-r--r--tests/rest/client/v1/test_admin.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/rest/client/v1/test_admin.py b/tests/rest/client/v1/test_admin.py
index fb28883d30..1a553fa3f9 100644
--- a/tests/rest/client/v1/test_admin.py
+++ b/tests/rest/client/v1/test_admin.py
@@ -51,7 +51,7 @@ class UserRegisterTestCase(unittest.TestCase):
         self.secrets = Mock()
 
         self.hs = setup_test_homeserver(
-            http_client=None, clock=self.hs_clock, reactor=self.clock
+            self.addCleanup, http_client=None, clock=self.hs_clock, reactor=self.clock
         )
 
         self.hs.config.registration_shared_secret = u"shared"
@@ -215,6 +215,7 @@ class UserRegisterTestCase(unittest.TestCase):
         mac.  Admin is optional.  Additional checks are done for length and
         type.
         """
+
         def nonce():
             request, channel = make_request("GET", self.url)
             render(request, self.resource, self.clock)
@@ -289,7 +290,9 @@ class UserRegisterTestCase(unittest.TestCase):
         self.assertEqual('Invalid password', channel.json_body["error"])
 
         # Must not have null bytes
-        body = json.dumps({"nonce": nonce(), "username": "a", "password": u"abcd\u0000"})
+        body = json.dumps(
+            {"nonce": nonce(), "username": "a", "password": u"abcd\u0000"}
+        )
         request, channel = make_request("POST", self.url, body.encode('utf8'))
         render(request, self.resource, self.clock)