summary refs log tree commit diff
path: root/tests/api
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-12-02 15:12:02 +0000
committerRichard van der Hoff <richard@matrix.org>2020-12-02 17:53:38 +0000
commit90cf1eec44940f8ede4a7f0490da43021c84a13a (patch)
treeb6421eb26044aba2fe53e0a5f5128db5e2e425b2 /tests/api
parentApply an IP range blacklist to push and key revocation requests. (#8821) (diff)
downloadsynapse-90cf1eec44940f8ede4a7f0490da43021c84a13a.tar.xz
Remove redundant mocking
Diffstat (limited to 'tests/api')
-rw-r--r--tests/api/test_filtering.py18
1 files changed, 2 insertions, 16 deletions
diff --git a/tests/api/test_filtering.py b/tests/api/test_filtering.py
index bcf1a8010e..279c94a03d 100644
--- a/tests/api/test_filtering.py
+++ b/tests/api/test_filtering.py
@@ -16,8 +16,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from mock import Mock
-
 import jsonschema
 
 from twisted.internet import defer
@@ -28,7 +26,7 @@ from synapse.api.filtering import Filter
 from synapse.events import make_event_from_dict
 
 from tests import unittest
-from tests.utils import DeferredMockCallable, MockHttpResource, setup_test_homeserver
+from tests.utils import setup_test_homeserver
 
 user_localpart = "test_user"
 
@@ -42,21 +40,9 @@ def MockEvent(**kwargs):
 
 
 class FilteringTestCase(unittest.TestCase):
-    @defer.inlineCallbacks
     def setUp(self):
-        self.mock_federation_resource = MockHttpResource()
-
-        self.mock_http_client = Mock(spec=[])
-        self.mock_http_client.put_json = DeferredMockCallable()
-
-        hs = yield setup_test_homeserver(
-            self.addCleanup,
-            federation_http_client=self.mock_http_client,
-            keyring=Mock(),
-        )
-
+        hs = setup_test_homeserver(self.addCleanup)
         self.filtering = hs.get_filtering()
-
         self.datastore = hs.get_datastore()
 
     def test_errors_on_invalid_filters(self):