summary refs log tree commit diff
path: root/tests/rest
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-09-12 10:46:02 +0100
committerMark Haines <mark.haines@matrix.org>2016-09-12 10:46:02 +0100
commitec609f80949972327274142e4eb5b506f55aba1a (patch)
treec87745ad5255dc595ddc859913b52f13ad57ef06 /tests/rest
parentMerge branch 'develop' into markjh/bearer_token (diff)
downloadsynapse-ec609f80949972327274142e4eb5b506f55aba1a.tar.xz
Fix unit tests
Diffstat (limited to 'tests/rest')
-rw-r--r--tests/rest/client/v1/test_register.py2
-rw-r--r--tests/rest/client/v2_alpha/test_register.py2
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 4a898a034f..73822f4d8c 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.appservice = None
         self.auth = Mock(get_appservice_by_req=Mock(
diff --git a/tests/rest/client/v2_alpha/test_register.py b/tests/rest/client/v2_alpha/test_register.py
index 8ac56a1fb2..d7ffd1d427 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(