summary refs log tree commit diff
path: root/tests/util
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2019-07-23 23:00:55 +1000
committerGitHub <noreply@github.com>2019-07-23 23:00:55 +1000
commit4806651744616bf48abf408034ab9560e33f60ce (patch)
tree64bc7394a6316f74d0aadd9ee989e30c0c217707 /tests/util
parentOpentracing Utils (#5722) (diff)
downloadsynapse-4806651744616bf48abf408034ab9560e33f60ce.tar.xz
Replace returnValue with return (#5736)
Diffstat (limited to 'tests/util')
-rw-r--r--tests/util/caches/test_descriptors.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/util/caches/test_descriptors.py b/tests/util/caches/test_descriptors.py
index 7807328e2f..56320bbaf9 100644
--- a/tests/util/caches/test_descriptors.py
+++ b/tests/util/caches/test_descriptors.py
@@ -159,7 +159,7 @@ class DescriptorTestCase(unittest.TestCase):
                 def inner_fn():
                     with PreserveLoggingContext():
                         yield complete_lookup
-                    defer.returnValue(1)
+                    return 1
 
                 return inner_fn()
 
@@ -169,7 +169,7 @@ class DescriptorTestCase(unittest.TestCase):
                 c1.name = "c1"
                 r = yield obj.fn(1)
                 self.assertEqual(LoggingContext.current_context(), c1)
-            defer.returnValue(r)
+            return r
 
         def check_result(r):
             self.assertEqual(r, 1)
@@ -286,7 +286,7 @@ class CachedListDescriptorTestCase(unittest.TestCase):
                 # we want this to behave like an asynchronous function
                 yield run_on_reactor()
                 assert LoggingContext.current_context().request == "c1"
-                defer.returnValue(self.mock(args1, arg2))
+                return self.mock(args1, arg2)
 
         with LoggingContext() as c1:
             c1.request = "c1"
@@ -334,7 +334,7 @@ class CachedListDescriptorTestCase(unittest.TestCase):
             def list_fn(self, args1, arg2):
                 # we want this to behave like an asynchronous function
                 yield run_on_reactor()
-                defer.returnValue(self.mock(args1, arg2))
+                return self.mock(args1, arg2)
 
         obj = Cls()
         invalidate0 = mock.Mock()