mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
fix (lots of) py3 test failures
This commit is contained in:
parent
b2aab04d2c
commit
5593ff6773
@ -69,12 +69,12 @@ class ServerConfig(Config):
|
|||||||
|
|
||||||
# Options to control access by tracking MAU
|
# Options to control access by tracking MAU
|
||||||
self.limit_usage_by_mau = config.get("limit_usage_by_mau", False)
|
self.limit_usage_by_mau = config.get("limit_usage_by_mau", False)
|
||||||
|
self.max_mau_value = 0
|
||||||
if self.limit_usage_by_mau:
|
if self.limit_usage_by_mau:
|
||||||
self.max_mau_value = config.get(
|
self.max_mau_value = config.get(
|
||||||
"max_mau_value", 0,
|
"max_mau_value", 0,
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
self.max_mau_value = 0
|
|
||||||
# FIXME: federation_domain_whitelist needs sytests
|
# FIXME: federation_domain_whitelist needs sytests
|
||||||
self.federation_domain_whitelist = None
|
self.federation_domain_whitelist = None
|
||||||
federation_domain_whitelist = config.get(
|
federation_domain_whitelist = config.get(
|
||||||
|
@ -34,7 +34,6 @@ class ClientIpStoreTestCase(tests.unittest.TestCase):
|
|||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def test_insert_new_client_ip(self):
|
def test_insert_new_client_ip(self):
|
||||||
self.hs.config.max_mau_value = 50
|
|
||||||
self.clock.now = 12345678
|
self.clock.now = 12345678
|
||||||
user_id = "@user:id"
|
user_id = "@user:id"
|
||||||
yield self.store.insert_client_ip(
|
yield self.store.insert_client_ip(
|
||||||
|
@ -73,6 +73,7 @@ def setup_test_homeserver(name="test", datastore=None, config=None, reactor=None
|
|||||||
config.block_events_without_consent_error = None
|
config.block_events_without_consent_error = None
|
||||||
config.media_storage_providers = []
|
config.media_storage_providers = []
|
||||||
config.auto_join_rooms = []
|
config.auto_join_rooms = []
|
||||||
|
config.limit_usage_by_mau = False
|
||||||
|
|
||||||
# disable user directory updates, because they get done in the
|
# disable user directory updates, because they get done in the
|
||||||
# background, which upsets the test runner.
|
# background, which upsets the test runner.
|
||||||
|
Loading…
Reference in New Issue
Block a user