diff options
author | Mark Haines <mjark@negativecurvature.net> | 2016-10-25 17:33:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-25 17:33:15 +0100 |
commit | 177f104432b3ab124bb0ae0b7e0e1c2eeae2f492 (patch) | |
tree | 0118fd2870598a004d7439f67e21c8651f425643 /tests/rest/client | |
parent | Merge branch 'release-v0.18.2' of github.com:matrix-org/synapse into develop (diff) | |
parent | Merge branch 'develop' into markjh/bearer_token (diff) | |
download | synapse-177f104432b3ab124bb0ae0b7e0e1c2eeae2f492.tar.xz |
Merge pull request #1098 from matrix-org/markjh/bearer_token
Allow clients to supply access_tokens as headers
Diffstat (limited to 'tests/rest/client')
-rw-r--r-- | tests/rest/client/v1/test_register.py | 2 | ||||
-rw-r--r-- | tests/rest/client/v2_alpha/test_register.py | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/rest/client/v1/test_register.py b/tests/rest/client/v1/test_register.py index 44ba9ff58f..a6a4e2ffe0 100644 --- a/tests/rest/client/v1/test_register.py +++ b/tests/rest/client/v1/test_register.py @@ -17,6 +17,7 @@ from synapse.rest.client.v1.register import CreateUserRestServlet from twisted.internet import defer from mock import Mock from tests import unittest +from tests.utils import mock_getRawHeaders import json @@ -30,6 +31,7 @@ class CreateUserServletTestCase(unittest.TestCase): path='/_matrix/client/api/v1/createUser' ) self.request.args = {} + self.request.requestHeaders.getRawHeaders = mock_getRawHeaders() self.registration_handler = Mock() diff --git a/tests/rest/client/v2_alpha/test_register.py b/tests/rest/client/v2_alpha/test_register.py index e9cb416e4b..b4a787c436 100644 --- a/tests/rest/client/v2_alpha/test_register.py +++ b/tests/rest/client/v2_alpha/test_register.py @@ -3,6 +3,7 @@ from synapse.api.errors import SynapseError from twisted.internet import defer from mock import Mock from tests import unittest +from tests.utils import mock_getRawHeaders import json @@ -16,6 +17,7 @@ class RegisterRestServletTestCase(unittest.TestCase): path='/_matrix/api/v2_alpha/register' ) self.request.args = {} + self.request.requestHeaders.getRawHeaders = mock_getRawHeaders() self.appservice = None self.auth = Mock(get_appservice_by_req=Mock( |