mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-07 01:04:13 -04:00
Update mypy and mypy-zope, attempt 3 (#13993)
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
This commit is contained in:
parent
8e52cb0bce
commit
285d72556b
11 changed files with 61 additions and 68 deletions
|
@ -96,8 +96,12 @@ class MonthlyActiveUsersTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# Test each of the registered users is marked as active
|
||||
timestamp = self.get_success(self.store.user_last_seen_monthly_active(user1))
|
||||
# Mypy notes that one shouldn't compare Optional[int] to 0 with assertGreater.
|
||||
# Check that timestamp really is an int.
|
||||
assert timestamp is not None
|
||||
self.assertGreater(timestamp, 0)
|
||||
timestamp = self.get_success(self.store.user_last_seen_monthly_active(user2))
|
||||
assert timestamp is not None
|
||||
self.assertGreater(timestamp, 0)
|
||||
|
||||
# Test that users with reserved 3pids are not removed from the MAU table
|
||||
|
@ -166,10 +170,11 @@ class MonthlyActiveUsersTestCase(unittest.HomeserverTestCase):
|
|||
self.get_success(self.store.upsert_monthly_active_user(user_id2))
|
||||
|
||||
result = self.get_success(self.store.user_last_seen_monthly_active(user_id1))
|
||||
assert result is not None
|
||||
self.assertGreater(result, 0)
|
||||
|
||||
result = self.get_success(self.store.user_last_seen_monthly_active(user_id3))
|
||||
self.assertNotEqual(result, 0)
|
||||
self.assertIsNone(result)
|
||||
|
||||
@override_config({"max_mau_value": 5})
|
||||
def test_reap_monthly_active_users(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue