diff options
author | David Baker <dbkr@users.noreply.github.com> | 2016-07-20 11:03:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-20 11:03:33 +0100 |
commit | e967bc86e7bb90aeebb4ea2e4161d0049f1fefcc (patch) | |
tree | bdfdec01757bad35e439652a2ade1bcc78aa10da /tests | |
parent | Merge pull request #922 from matrix-org/erikj/file_api2 (diff) | |
parent | Further registration refactoring (diff) | |
download | synapse-e967bc86e7bb90aeebb4ea2e4161d0049f1fefcc.tar.xz |
Merge pull request #932 from matrix-org/rav/register_refactor
Further registration refactoring
Diffstat (limited to 'tests')
-rw-r--r-- | tests/rest/client/v2_alpha/test_register.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/rest/client/v2_alpha/test_register.py b/tests/rest/client/v2_alpha/test_register.py index 9a4215fef7..ccbb8776d3 100644 --- a/tests/rest/client/v2_alpha/test_register.py +++ b/tests/rest/client/v2_alpha/test_register.py @@ -61,8 +61,10 @@ class RegisterRestServletTestCase(unittest.TestCase): "id": "1234" } self.registration_handler.appservice_register = Mock( - return_value=(user_id, token) + return_value=user_id ) + self.auth_handler.issue_access_token = Mock(return_value=token) + (code, result) = yield self.servlet.on_POST(self.request) self.assertEquals(code, 200) det_data = { @@ -126,6 +128,8 @@ class RegisterRestServletTestCase(unittest.TestCase): } self.assertDictContainsSubset(det_data, result) self.assertIn("refresh_token", result) + self.auth_handler.issue_access_token.assert_called_once_with( + user_id) def test_POST_disabled_registration(self): self.hs.config.enable_registration = False |