summary refs log tree commit diff
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-08-03 14:59:17 +0100
committerNeil Johnson <neil@matrix.org>2018-08-03 14:59:17 +0100
commit5593ff6773c7556b85514ee172c4b6c06898f35e (patch)
tree011ac022785d2877b18723b2d057717c4c0de78d
parentfix py3 test failure (diff)
downloadsynapse-5593ff6773c7556b85514ee172c4b6c06898f35e.tar.xz
fix (lots of) py3 test failures
-rw-r--r--synapse/config/server.py4
-rw-r--r--tests/storage/test_client_ips.py1
-rw-r--r--tests/utils.py1
3 files changed, 3 insertions, 3 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 6a471a0a5e..8fd2319759 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -69,12 +69,12 @@ class ServerConfig(Config):
 
         # Options to control access by tracking MAU
         self.limit_usage_by_mau = config.get("limit_usage_by_mau", False)
+        self.max_mau_value = 0
         if self.limit_usage_by_mau:
             self.max_mau_value = config.get(
                 "max_mau_value", 0,
             )
-        else:
-            self.max_mau_value = 0
+
         # FIXME: federation_domain_whitelist needs sytests
         self.federation_domain_whitelist = None
         federation_domain_whitelist = config.get(
diff --git a/tests/storage/test_client_ips.py b/tests/storage/test_client_ips.py
index 0cd290176e..e1552510cc 100644
--- a/tests/storage/test_client_ips.py
+++ b/tests/storage/test_client_ips.py
@@ -34,7 +34,6 @@ class ClientIpStoreTestCase(tests.unittest.TestCase):
 
     @defer.inlineCallbacks
     def test_insert_new_client_ip(self):
-        self.hs.config.max_mau_value = 50
         self.clock.now = 12345678
         user_id = "@user:id"
         yield self.store.insert_client_ip(
diff --git a/tests/utils.py b/tests/utils.py
index 9bff3ff3b9..ec40428e74 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -73,6 +73,7 @@ def setup_test_homeserver(name="test", datastore=None, config=None, reactor=None
         config.block_events_without_consent_error = None
         config.media_storage_providers = []
         config.auto_join_rooms = []
+        config.limit_usage_by_mau = False
 
         # disable user directory updates, because they get done in the
         # background, which upsets the test runner.