summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2021-09-20 17:32:59 +0100
committerDavid Robertson <davidr@element.io>2021-09-20 17:32:59 +0100
commit7ed6f1658b5e7a23fd5ab9cbbc9d5f44ffe21f70 (patch)
treea235a77d75f1db94a099fe487048e0ee049d5537
parentTweak worker requests' instance_name (diff)
downloadsynapse-github/dmr/return-request-id.tar.xz
-rw-r--r--tests/logging/test_terse_json.py2
-rw-r--r--tests/server.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/logging/test_terse_json.py b/tests/logging/test_terse_json.py
index e88d5c8780..5d87572bc4 100644
--- a/tests/logging/test_terse_json.py
+++ b/tests/logging/test_terse_json.py
@@ -188,7 +188,7 @@ class TerseJsonTestCase(LoggerCleanupMixin, TestCase):
         ]
         self.assertCountEqual(log.keys(), expected_log_keys)
         self.assertEqual(log["log"], "Hello there, wally!")
-        self.assertTrue(log["request"].startswith("POST-"))
+        self.assertIn("POST-", log["request"])
         self.assertEqual(log["ip_address"], "127.0.0.1")
         self.assertEqual(log["site_tag"], "test-site")
         self.assertEqual(log["requester"], "@foo:test")
diff --git a/tests/server.py b/tests/server.py
index b861c7b866..1f290cee3d 100644
--- a/tests/server.py
+++ b/tests/server.py
@@ -268,7 +268,7 @@ def make_request(
 
     channel = FakeChannel(site, reactor, ip=client_ip)
 
-    req = request(channel)
+    req = request(channel, instance_name="test")
     req.content = BytesIO(content)
     # Twisted expects to be at the end of the content when parsing the request.
     req.content.seek(SEEK_END)