Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
Correct test.
Browse files Browse the repository at this point in the history
Since we're pulling config options out of the config during class
__init__ functions now, instead of during runtime,
we can't just change the homeserver config and expect runtime to
have the new value.

We need to change the vars that get set in those __init__ functions
directly. In this case, RegistrationStore.__init__.
  • Loading branch information
anoadragon453 committed Dec 30, 2020
1 parent c239f78 commit 150e7e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/rest/client/v2_alpha/test_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ def make_homeserver(self, reactor, clock):
config["account_validity"] = {"enabled": False}

self.hs = self.setup_test_homeserver(config=config)
self.hs.config.account_validity_period = self.validity_period
self.hs.get_datastore()._account_validity_period = self.validity_period

self.store = self.hs.get_datastore()

Expand All @@ -877,7 +877,7 @@ def test_background_job(self):
"""
user_id = self.register_user("kermit_delta", "user")

self.hs.config.account_validity_startup_job_max_delta = self.max_delta
self.hs.get_datastore()._account_validity_startup_job_max_delta = self.max_delta

now_ms = self.hs.clock.time_msec()
self.get_success(self.store._set_expiration_date_when_missing())
Expand Down

0 comments on commit 150e7e9

Please sign in to comment.