mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-13 20:00:45 -05:00
Remove redundant mocking
This commit is contained in:
parent
30fba62108
commit
90cf1eec44
5 changed files with 5 additions and 36 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue