summary refs log tree commit diff
path: root/tests/storage
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-08-27 17:24:37 -0400
committerGitHub <noreply@github.com>2020-08-27 17:24:37 -0400
commitb49a5b9307fbbc9032e28e532e9036db07555d3d (patch)
treedaf087f5653a075a5f66aed337d5c1ad4eb8eec4 /tests/storage
parentConvert simple_delete to async/await. (#8191) (diff)
downloadsynapse-b49a5b9307fbbc9032e28e532e9036db07555d3d.tar.xz
Convert stats and related calls to async/await (#8192)
Diffstat (limited to 'tests/storage')
-rw-r--r--tests/storage/test_client_ips.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/storage/test_client_ips.py b/tests/storage/test_client_ips.py
index 224ea6fd79..370c247e16 100644
--- a/tests/storage/test_client_ips.py
+++ b/tests/storage/test_client_ips.py
@@ -16,13 +16,12 @@
 
 from mock import Mock
 
-from twisted.internet import defer
-
 import synapse.rest.admin
 from synapse.http.site import XForwardedForRequest
 from synapse.rest.client.v1 import login
 
 from tests import unittest
+from tests.test_utils import make_awaitable
 from tests.unittest import override_config
 
 
@@ -155,7 +154,7 @@ class ClientIpStoreTestCase(unittest.HomeserverTestCase):
         user_id = "@user:server"
 
         self.store.get_monthly_active_count = Mock(
-            return_value=defer.succeed(lots_of_users)
+            side_effect=lambda: make_awaitable(lots_of_users)
         )
         self.get_success(
             self.store.insert_client_ip(