summary refs log tree commit diff
path: root/tests/logging
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-04-20 14:55:16 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-04-20 14:55:16 +0100
commit6982db965164ec54a0f5f7cb39b778f6ed0a7306 (patch)
treefdd66aaf3e4433b0e91b0a708edf280e02058178 /tests/logging
parentAdd presence federation stream (#9819) (diff)
parentUpdate v1.32.0 changelog. It's m.login.application_service, not plural (diff)
downloadsynapse-6982db965164ec54a0f5f7cb39b778f6ed0a7306.tar.xz
Merge branch 'master' into develop
Diffstat (limited to 'tests/logging')
-rw-r--r--tests/logging/test_terse_json.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/logging/test_terse_json.py b/tests/logging/test_terse_json.py
index 6cddb95c30..1160716929 100644
--- a/tests/logging/test_terse_json.py
+++ b/tests/logging/test_terse_json.py
@@ -137,7 +137,7 @@ class TerseJsonTestCase(LoggerCleanupMixin, TestCase):
         ]
         self.assertCountEqual(log.keys(), expected_log_keys)
         self.assertEqual(log["log"], "Hello there, wally!")
-        self.assertTrue(log["request"].startswith("name@"))
+        self.assertEqual(log["request"], "name")
 
     def test_with_request_context(self):
         """
@@ -164,7 +164,9 @@ class TerseJsonTestCase(LoggerCleanupMixin, TestCase):
         # Also set the requester to ensure the processing works.
         request.requester = "@foo:test"
 
-        with LoggingContext(parent_context=request.logcontext):
+        with LoggingContext(
+            request.get_request_id(), parent_context=request.logcontext
+        ):
             logger.info("Hello there, %s!", "wally")
 
         log = self.get_log_line()