summary refs log tree commit diff
path: root/tests/util/test_async_utils.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2019-07-04 00:07:04 +1000
committerGitHub <noreply@github.com>2019-07-04 00:07:04 +1000
commit463b072b1290a8cb75bc1d7b6688fa76bbfdb14f (patch)
treeb3b3f1807e74ff1aa23f48384c4d64a165975131 /tests/util/test_async_utils.py
parentFix 'utime went backwards' errors on daemonization. (#5609) (diff)
downloadsynapse-463b072b1290a8cb75bc1d7b6688fa76bbfdb14f.tar.xz
Move logging utilities out of the side drawer of util/ and into logging/ (#5606)
Diffstat (limited to 'tests/util/test_async_utils.py')
-rw-r--r--tests/util/test_async_utils.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/util/test_async_utils.py b/tests/util/test_async_utils.py
index bf85d3b8ec..f60918069a 100644
--- a/tests/util/test_async_utils.py
+++ b/tests/util/test_async_utils.py
@@ -16,9 +16,8 @@ from twisted.internet import defer
 from twisted.internet.defer import CancelledError, Deferred
 from twisted.internet.task import Clock
 
-from synapse.util import logcontext
+from synapse.logging.context import LoggingContext, PreserveLoggingContext
 from synapse.util.async_helpers import timeout_deferred
-from synapse.util.logcontext import LoggingContext
 
 from tests.unittest import TestCase
 
@@ -69,14 +68,14 @@ class TimeoutDeferredTest(TestCase):
         @defer.inlineCallbacks
         def blocking():
             non_completing_d = Deferred()
-            with logcontext.PreserveLoggingContext():
+            with PreserveLoggingContext():
                 try:
                     yield non_completing_d
                 except CancelledError:
                     blocking_was_cancelled[0] = True
                     raise
 
-        with logcontext.LoggingContext("one") as context_one:
+        with LoggingContext("one") as context_one:
             # the errbacks should be run in the test logcontext
             def errback(res, deferred_name):
                 self.assertIs(