summary refs log tree commit diff
diff options
context:
space:
mode:
authordklimpel <5740567+dklimpel@users.noreply.github.com>2020-03-09 22:13:20 +0100
committerdklimpel <5740567+dklimpel@users.noreply.github.com>2020-03-09 22:13:20 +0100
commit39f6595b4ab108cb451072ae251a91117002191c (patch)
treedd4d95f77d63d10af8b7bca8090b9e4bded991d4
parentupdates after review (diff)
downloadsynapse-39f6595b4ab108cb451072ae251a91117002191c.tar.xz
lint, fix tests
-rw-r--r--synapse/handlers/profile.py4
-rw-r--r--tests/rest/client/v2_alpha/test_account.py4
2 files changed, 5 insertions, 3 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py

index eb85dba015..6aa1c0f5e0 100644 --- a/synapse/handlers/profile.py +++ b/synapse/handlers/profile.py
@@ -161,7 +161,9 @@ class BaseProfileHandler(BaseHandler): profile = yield self.store.get_profileinfo(target_user.localpart) if profile.display_name: raise SynapseError( - 400, "Changing display name is disabled on this server", Codes.FORBIDDEN + 400, + "Changing display name is disabled on this server", + Codes.FORBIDDEN, ) if len(new_displayname) > MAX_DISPLAYNAME_LEN: diff --git a/tests/rest/client/v2_alpha/test_account.py b/tests/rest/client/v2_alpha/test_account.py
index 34e40a36d0..99cc9163f3 100644 --- a/tests/rest/client/v2_alpha/test_account.py +++ b/tests/rest/client/v2_alpha/test_account.py
@@ -413,7 +413,7 @@ class ThreepidEmailRestTestCase(unittest.HomeserverTestCase): def test_add_email_if_disabled(self): """Test add mail to profile if disabled """ - self.hs.config.enable_3pid_changes = True + self.hs.config.enable_3pid_changes = False client_secret = "foobar" session_id = self._request_token(self.email, client_secret) @@ -485,7 +485,7 @@ class ThreepidEmailRestTestCase(unittest.HomeserverTestCase): def test_delete_email_if_disabled(self): """Test delete mail from profile if disabled """ - self.hs.config.enable_3pid_changes = True + self.hs.config.enable_3pid_changes = False # Add a threepid self.get_success(