summary refs log tree commit diff
path: root/tests/unittest.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-09-20 20:14:34 +1000
committerGitHub <noreply@github.com>2018-09-20 20:14:34 +1000
commit1f3f5fcf52efdf5215dc6c7cd3805b1357bf8236 (patch)
tree0ea1a5b02e4f0659e92b40ea450af96d8a6ab702 /tests/unittest.py
parentMerge pull request #3914 from matrix-org/erikj/remove_retry_cache (diff)
downloadsynapse-1f3f5fcf52efdf5215dc6c7cd3805b1357bf8236.tar.xz
Fix client IPs being broken on Python 3 (#3908)
Diffstat (limited to 'tests/unittest.py')
-rw-r--r--tests/unittest.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/unittest.py b/tests/unittest.py
index 56f3dca394..ef905e6389 100644
--- a/tests/unittest.py
+++ b/tests/unittest.py
@@ -26,6 +26,7 @@ from twisted.internet.defer import Deferred
 from twisted.trial import unittest
 
 from synapse.http.server import JsonResource
+from synapse.http.site import SynapseRequest
 from synapse.server import HomeServer
 from synapse.types import UserID, create_requester
 from synapse.util.logcontext import LoggingContextFilter
@@ -237,7 +238,9 @@ class HomeserverTestCase(TestCase):
         Function to optionally be overridden in subclasses.
         """
 
-    def make_request(self, method, path, content=b""):
+    def make_request(
+        self, method, path, content=b"", access_token=None, request=SynapseRequest
+    ):
         """
         Create a SynapseRequest at the path using the method and containing the
         given content.
@@ -255,7 +258,7 @@ class HomeserverTestCase(TestCase):
         if isinstance(content, dict):
             content = json.dumps(content).encode('utf8')
 
-        return make_request(method, path, content)
+        return make_request(method, path, content, access_token, request)
 
     def render(self, request):
         """