Separate the TCP and terse JSON formatting code. (#8587)

This should (theoretically) allow for using the TCP code with a different output type
and make it easier to use the JSON code with files / console.
This commit is contained in:
Patrick Cloke 2020-10-21 06:59:54 -04:00 committed by GitHub
parent 654cc9470e
commit 20a67aa70d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 240 additions and 187 deletions

View file

@ -78,7 +78,7 @@ class TerseJSONTCPTestCase(StructuredLoggingTestBase, HomeserverTestCase):
"server_name",
"name",
]
self.assertEqual(set(log.keys()), set(expected_log_keys))
self.assertCountEqual(log.keys(), expected_log_keys)
# It contains the data we expect.
self.assertEqual(log["name"], "wally")