summary refs log tree commit diff
path: root/tests/util/caches/test_descriptors.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-10-30 14:06:34 +0100
committerGitHub <noreply@github.com>2019-10-30 14:06:34 +0100
commite5c3a990916bf0508f705be599f6d0bcb3c20d59 (patch)
tree6535228ec5c1325bc9f0d89a750bda250416e707 /tests/util/caches/test_descriptors.py
parentModify doc to update Google ReCaptcha terms (#6257) (diff)
parentClarify docstring (diff)
downloadsynapse-e5c3a990916bf0508f705be599f6d0bcb3c20d59.tar.xz
Merge pull request #6291 from matrix-org/erikj/fix_cache_descriptor
Make ObservableDeferred.observe() always return deferred.
Diffstat (limited to 'tests/util/caches/test_descriptors.py')
-rw-r--r--tests/util/caches/test_descriptors.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/util/caches/test_descriptors.py b/tests/util/caches/test_descriptors.py

index f907903511..39e360fe24 100644 --- a/tests/util/caches/test_descriptors.py +++ b/tests/util/caches/test_descriptors.py
@@ -310,14 +310,14 @@ class DescriptorTestCase(unittest.TestCase): obj.mock.return_value = ["spam", "eggs"] r = obj.fn(1, 2) - self.assertEqual(r, ["spam", "eggs"]) + self.assertEqual(r.result, ["spam", "eggs"]) obj.mock.assert_called_once_with(1, 2) obj.mock.reset_mock() # a call with different params should call the mock again obj.mock.return_value = ["chips"] r = obj.fn(1, 3) - self.assertEqual(r, ["chips"]) + self.assertEqual(r.result, ["chips"]) obj.mock.assert_called_once_with(1, 3) obj.mock.reset_mock()