summary refs log tree commit diff
path: root/tests/unittest.py
diff options
context:
space:
mode:
authorQuentin Gliech <quenting@element.io>2024-04-25 14:50:12 +0200
committerGitHub <noreply@github.com>2024-04-25 12:50:12 +0000
commit2e92b718d5ea063af4b2dc9412dcd2ce625b4987 (patch)
tree9d916997bcd61eaf055c622b2aa27919faeb9cc9 /tests/unittest.py
parentAdd type annotation to `visited_chains` (#17125) (diff)
downloadsynapse-2e92b718d5ea063af4b2dc9412dcd2ce625b4987.tar.xz
MSC4108 implementation (#17056)
Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
Diffstat (limited to 'tests/unittest.py')
-rw-r--r--tests/unittest.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unittest.py b/tests/unittest.py
index 6fe0cd4a2d..e6aad9ed40 100644
--- a/tests/unittest.py
+++ b/tests/unittest.py
@@ -523,6 +523,7 @@ class HomeserverTestCase(TestCase):
         request: Type[Request] = SynapseRequest,
         shorthand: bool = True,
         federation_auth_origin: Optional[bytes] = None,
+        content_type: Optional[bytes] = None,
         content_is_form: bool = False,
         await_result: bool = True,
         custom_headers: Optional[Iterable[CustomHeaderType]] = None,
@@ -541,6 +542,9 @@ class HomeserverTestCase(TestCase):
             with the usual REST API path, if it doesn't contain it.
             federation_auth_origin: if set to not-None, we will add a fake
                 Authorization header pretenting to be the given server name.
+
+            content_type: The content-type to use for the request. If not set then will default to
+                application/json unless content_is_form is true.
             content_is_form: Whether the content is URL encoded form data. Adds the
                 'Content-Type': 'application/x-www-form-urlencoded' header.
 
@@ -566,6 +570,7 @@ class HomeserverTestCase(TestCase):
             request,
             shorthand,
             federation_auth_origin,
+            content_type,
             content_is_form,
             await_result,
             custom_headers,