summary refs log tree commit diff
path: root/tests/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-10-30 11:35:46 +0000
committerErik Johnston <erik@matrix.org>2019-10-30 11:35:46 +0000
commit326b3dace77aeb36e516ea9b04ba1baa171bcb47 (patch)
tree5eb76e0cd616ac49bbaf0eede5705411fd31401c /tests/storage
parentFix typo in domain name in account_threepid_delegates config option (#6273) (diff)
downloadsynapse-326b3dace77aeb36e516ea9b04ba1baa171bcb47.tar.xz
Make ObservableDeferred.observe() always return deferred.
This makes it easier to use in an async/await world.

Also fixes a bug where cache descriptors would occaisonally return a raw
value rather than a deferred.
Diffstat (limited to 'tests/storage')
-rw-r--r--tests/storage/test__base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/storage/test__base.py b/tests/storage/test__base.py
index dd49a14524..9b81b536f5 100644
--- a/tests/storage/test__base.py
+++ b/tests/storage/test__base.py
@@ -197,7 +197,7 @@ class CacheDecoratorTestCase(unittest.TestCase):
 
         a.func.prefill(("foo",), ObservableDeferred(d))
 
-        self.assertEquals(a.func("foo"), d.result)
+        self.assertEquals(a.func("foo").result, d.result)
         self.assertEquals(callcount[0], 0)
 
     @defer.inlineCallbacks