diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2020-06-03 16:39:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 16:39:30 +0100 |
commit | 0188daf32c5d978c33b2bba9eb2b0b63262ca5fe (patch) | |
tree | 1c4cc9399cd8f43a9dc965a4b666711202fe8af8 /tests/test_mau.py | |
parent | Check if the localpart is reserved for guests earlier in the registration flo... (diff) | |
download | synapse-0188daf32c5d978c33b2bba9eb2b0b63262ca5fe.tar.xz |
Replace instances of reactor pumping with get_success. (#7619)
Calls `self.get_success` on all deferred methods instead of abusing `self.pump()`. This has the benefit of working with coroutines, as well as checking that method execution completed successfully. There are also a few small cleanups that I made in the process.
Diffstat (limited to '')
-rw-r--r-- | tests/test_mau.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_mau.py b/tests/test_mau.py index 8a97f0998d..49667ed7f4 100644 --- a/tests/test_mau.py +++ b/tests/test_mau.py @@ -85,7 +85,7 @@ class TestMauLimit(unittest.HomeserverTestCase): # Advance time by 31 days self.reactor.advance(31 * 24 * 60 * 60) - self.store.reap_monthly_active_users() + self.get_success(self.store.reap_monthly_active_users()) self.reactor.advance(0) @@ -147,8 +147,7 @@ class TestMauLimit(unittest.HomeserverTestCase): # Advance by 2 months so everyone falls out of MAU self.reactor.advance(60 * 24 * 60 * 60) - self.store.reap_monthly_active_users() - self.reactor.advance(0) + self.get_success(self.store.reap_monthly_active_users()) # We can create as many new users as we want token4 = self.create_user("kermit4") |