summary refs log tree commit diff
path: root/tests/util
diff options
context:
space:
mode:
authorBruno Windels <brunow@matrix.org>2018-09-27 19:18:38 +0100
committerBruno Windels <brunow@matrix.org>2018-09-27 19:18:38 +0100
commitc5e1de677d137f0effe24a82c3c1846d60e72a9f (patch)
tree65d232f95219430c735d4864533515c354669702 /tests/util
parentadd changelog (diff)
parentMerge pull request #3794 from matrix-org/erikj/faster_typing (diff)
downloadsynapse-github/bwindels/registerasregularuser.tar.xz
Merge branch 'develop' into bwindels/registerasregularuser github/bwindels/registerasregularuser bwindels/registerasregularuser
Diffstat (limited to 'tests/util')
-rw-r--r--tests/util/test_expiring_cache.py1
-rw-r--r--tests/util/test_logcontext.py5
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/util/test_expiring_cache.py b/tests/util/test_expiring_cache.py

index 5cbada4eda..50bc7702d2 100644 --- a/tests/util/test_expiring_cache.py +++ b/tests/util/test_expiring_cache.py
@@ -65,7 +65,6 @@ class ExpiringCacheTestCase(unittest.TestCase): def test_time_eviction(self): clock = MockClock() cache = ExpiringCache("test", clock, expiry_ms=1000) - cache.start() cache["key"] = 1 clock.advance_time(0.5) diff --git a/tests/util/test_logcontext.py b/tests/util/test_logcontext.py
index 4633db77b3..8adaee3c8d 100644 --- a/tests/util/test_logcontext.py +++ b/tests/util/test_logcontext.py
@@ -159,6 +159,11 @@ class LoggingContextTestCase(unittest.TestCase): self.assertEqual(r, "bum") self._check_test_key("one") + def test_nested_logging_context(self): + with LoggingContext(request="foo"): + nested_context = logcontext.nested_logging_context(suffix="bar") + self.assertEqual(nested_context.request, "foo-bar") + # a function which returns a deferred which has been "called", but # which had a function which returned another incomplete deferred on