pull/14/head
Erik Johnston 7 years ago
parent 265b993b8a
commit 6ea27fafad
  1. 2
      tests/handlers/test_directory.py
  2. 2
      tests/handlers/test_e2e_keys.py
  3. 3
      tests/handlers/test_profile.py
  4. 2
      tests/handlers/test_typing.py
  5. 2
      tests/replication/slave/storage/_base.py
  6. 2
      tests/rest/client/v1/test_events.py
  7. 2
      tests/rest/client/v1/test_profile.py
  8. 16
      tests/rest/client/v1/test_rooms.py
  9. 2
      tests/rest/client/v1/test_typing.py
  10. 10
      tests/storage/test_appservice.py

@ -47,7 +47,7 @@ class DirectoryTestCase(unittest.TestCase):
hs = yield setup_test_homeserver(
http_client=None,
resource_for_federation=Mock(),
replication_layer=self.mock_federation,
replication_client=self.mock_federation,
federation_registry=self.mock_registry,
)
hs.handlers = DirectoryHandlers(hs)

@ -34,7 +34,7 @@ class E2eKeysHandlerTestCase(unittest.TestCase):
def setUp(self):
self.hs = yield utils.setup_test_homeserver(
handlers=None,
replication_layer=mock.Mock(),
replication_client=mock.Mock(),
)
self.handler = synapse.handlers.e2e_keys.E2eKeysHandler(self.hs)

@ -51,7 +51,8 @@ class ProfileTestCase(unittest.TestCase):
http_client=None,
handlers=None,
resource_for_federation=Mock(),
replication_layer=self.mock_federation,
replication_client=self.mock_federation,
replication_server=Mock(),
federation_registry=self.mock_registry,
ratelimiter=NonCallableMock(spec_set=[
"send_message",

@ -81,7 +81,7 @@ class TypingNotificationsTestCase(unittest.TestCase):
"get_current_state_deltas",
]),
state_handler=self.state_handler,
handlers=None,
handlers=Mock(),
notifier=mock_notifier,
resource_for_client=Mock(),
resource_for_federation=self.mock_federation_resource,

@ -31,7 +31,7 @@ class BaseSlavedStoreTestCase(unittest.TestCase):
self.hs = yield setup_test_homeserver(
"blue",
http_client=None,
replication_layer=Mock(),
replication_client=Mock(),
ratelimiter=NonCallableMock(spec_set=[
"send_message",
]),

@ -114,7 +114,7 @@ class EventStreamPermissionsTestCase(RestTestCase):
hs = yield setup_test_homeserver(
http_client=None,
replication_layer=Mock(),
replication_client=Mock(),
ratelimiter=NonCallableMock(spec_set=[
"send_message",
]),

@ -45,7 +45,7 @@ class ProfileTestCase(unittest.TestCase):
http_client=None,
resource_for_client=self.mock_resource,
federation=Mock(),
replication_layer=Mock(),
replication_client=Mock(),
profile_handler=self.mock_handler
)

@ -46,7 +46,7 @@ class RoomPermissionsTestCase(RestTestCase):
hs = yield setup_test_homeserver(
"red",
http_client=None,
replication_layer=Mock(),
replication_client=Mock(),
ratelimiter=NonCallableMock(spec_set=["send_message"]),
)
self.ratelimiter = hs.get_ratelimiter()
@ -409,7 +409,7 @@ class RoomsMemberListTestCase(RestTestCase):
hs = yield setup_test_homeserver(
"red",
http_client=None,
replication_layer=Mock(),
replication_client=Mock(),
ratelimiter=NonCallableMock(spec_set=["send_message"]),
)
self.ratelimiter = hs.get_ratelimiter()
@ -493,7 +493,7 @@ class RoomsCreateTestCase(RestTestCase):
hs = yield setup_test_homeserver(
"red",
http_client=None,
replication_layer=Mock(),
replication_client=Mock(),
ratelimiter=NonCallableMock(spec_set=["send_message"]),
)
self.ratelimiter = hs.get_ratelimiter()
@ -582,7 +582,7 @@ class RoomTopicTestCase(RestTestCase):
hs = yield setup_test_homeserver(
"red",
http_client=None,
replication_layer=Mock(),
replication_client=Mock(),
ratelimiter=NonCallableMock(spec_set=["send_message"]),
)
self.ratelimiter = hs.get_ratelimiter()
@ -697,7 +697,7 @@ class RoomMemberStateTestCase(RestTestCase):
hs = yield setup_test_homeserver(
"red",
http_client=None,
replication_layer=Mock(),
replication_client=Mock(),
ratelimiter=NonCallableMock(spec_set=["send_message"]),
)
self.ratelimiter = hs.get_ratelimiter()
@ -829,7 +829,7 @@ class RoomMessagesTestCase(RestTestCase):
hs = yield setup_test_homeserver(
"red",
http_client=None,
replication_layer=Mock(),
replication_client=Mock(),
ratelimiter=NonCallableMock(spec_set=["send_message"]),
)
self.ratelimiter = hs.get_ratelimiter()
@ -929,7 +929,7 @@ class RoomInitialSyncTestCase(RestTestCase):
hs = yield setup_test_homeserver(
"red",
http_client=None,
replication_layer=Mock(),
replication_client=Mock(),
ratelimiter=NonCallableMock(spec_set=[
"send_message",
]),
@ -1003,7 +1003,7 @@ class RoomMessageListTestCase(RestTestCase):
hs = yield setup_test_homeserver(
"red",
http_client=None,
replication_layer=Mock(),
replication_client=Mock(),
ratelimiter=NonCallableMock(spec_set=["send_message"]),
)
self.ratelimiter = hs.get_ratelimiter()

@ -47,7 +47,7 @@ class RoomTypingTestCase(RestTestCase):
"red",
clock=self.clock,
http_client=None,
replication_layer=Mock(),
replication_client=Mock(),
ratelimiter=NonCallableMock(spec_set=[
"send_message",
]),

@ -42,7 +42,7 @@ class ApplicationServiceStoreTestCase(unittest.TestCase):
hs = yield setup_test_homeserver(
config=config,
federation_sender=Mock(),
replication_layer=Mock(),
replication_client=Mock(),
)
self.as_token = "token1"
@ -119,7 +119,7 @@ class ApplicationServiceTransactionStoreTestCase(unittest.TestCase):
hs = yield setup_test_homeserver(
config=config,
federation_sender=Mock(),
replication_layer=Mock(),
replication_client=Mock(),
)
self.db_pool = hs.get_db_pool()
@ -455,7 +455,7 @@ class ApplicationServiceStoreConfigTestCase(unittest.TestCase):
config=config,
datastore=Mock(),
federation_sender=Mock(),
replication_layer=Mock(),
replication_client=Mock(),
)
ApplicationServiceStore(None, hs)
@ -473,7 +473,7 @@ class ApplicationServiceStoreConfigTestCase(unittest.TestCase):
config=config,
datastore=Mock(),
federation_sender=Mock(),
replication_layer=Mock(),
replication_client=Mock(),
)
with self.assertRaises(ConfigError) as cm:
@ -497,7 +497,7 @@ class ApplicationServiceStoreConfigTestCase(unittest.TestCase):
config=config,
datastore=Mock(),
federation_sender=Mock(),
replication_layer=Mock(),
replication_client=Mock(),
)
with self.assertRaises(ConfigError) as cm:

Loading…
Cancel
Save