mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 12:45:03 -04:00
Create a mechanism for marking tests "logcontext clean" (#8399)
This commit is contained in:
parent
bd715e1278
commit
5e3ca12b15
4 changed files with 41 additions and 21 deletions
|
@ -41,6 +41,7 @@ from synapse.storage.keys import FetchKeyResult
|
|||
|
||||
from tests import unittest
|
||||
from tests.test_utils import make_awaitable
|
||||
from tests.unittest import logcontext_clean
|
||||
|
||||
|
||||
class MockPerspectiveServer:
|
||||
|
@ -67,6 +68,7 @@ class MockPerspectiveServer:
|
|||
signedjson.sign.sign_json(res, self.server_name, self.key)
|
||||
|
||||
|
||||
@logcontext_clean
|
||||
class KeyringTestCase(unittest.HomeserverTestCase):
|
||||
def check_context(self, val, expected):
|
||||
self.assertEquals(getattr(current_context(), "request", None), expected)
|
||||
|
@ -309,6 +311,7 @@ class KeyringTestCase(unittest.HomeserverTestCase):
|
|||
mock_fetcher2.get_keys.assert_called_once()
|
||||
|
||||
|
||||
@logcontext_clean
|
||||
class ServerKeyFetcherTestCase(unittest.HomeserverTestCase):
|
||||
def make_homeserver(self, reactor, clock):
|
||||
self.http_client = Mock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue