From 5fc3477fd31850b0dfe2486adc96b699b718b6c6 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 17 Apr 2018 10:46:49 +0100 Subject: [PATCH] Fix tests --- tests/handlers/test_profile.py | 6 +++--- tests/utils.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/handlers/test_profile.py b/tests/handlers/test_profile.py index 458296ee4c..205190f8d6 100644 --- a/tests/handlers/test_profile.py +++ b/tests/handlers/test_profile.py @@ -75,7 +75,7 @@ class ProfileTestCase(unittest.TestCase): @defer.inlineCallbacks def test_get_my_name(self): yield self.store.set_profile_displayname( - self.frank.localpart, "Frank" + self.frank.localpart, "Frank", 1 ) displayname = yield self.handler.get_displayname(self.frank) @@ -124,7 +124,7 @@ class ProfileTestCase(unittest.TestCase): @defer.inlineCallbacks def test_incoming_fed_query(self): yield self.store.create_profile("caroline") - yield self.store.set_profile_displayname("caroline", "Caroline") + yield self.store.set_profile_displayname("caroline", "Caroline", 1) response = yield self.query_handlers["profile"]( {"user_id": "@caroline:test", "field": "displayname"} @@ -135,7 +135,7 @@ class ProfileTestCase(unittest.TestCase): @defer.inlineCallbacks def test_get_my_avatar(self): yield self.store.set_profile_avatar_url( - self.frank.localpart, "http://my.server/me.png" + self.frank.localpart, "http://my.server/me.png", 1 ) avatar_url = yield self.handler.get_avatar_url(self.frank) diff --git a/tests/utils.py b/tests/utils.py index f15317d27b..1e532f4a27 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -60,6 +60,7 @@ def setup_test_homeserver(name="test", datastore=None, config=None, **kargs): config.block_non_admin_invites = False config.federation_domain_whitelist = None config.user_directory_search_all_users = False + config.replicate_user_profiles_to = [] # disable user directory updates, because they get done in the # background, which upsets the test runner.