mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-29 03:28:34 +00:00
Fix test that assumes reactor time starts at 0
It no longer starts at 0 because we `self.reactor.advance(...)` waiting for the background updates to finish.
This commit is contained in:
@@ -85,6 +85,7 @@ class ModuleApiTestCase(BaseModuleApiTestCase):
|
||||
def test_can_register_user(self) -> None:
|
||||
"""Tests that an external module can register a user"""
|
||||
# Register a new user
|
||||
register_ts = int(self.clock.time_msec())
|
||||
user_id, access_token = self.get_success(
|
||||
self.module_api.register(
|
||||
"bob", displayname="Bobberino", emails=["bob@bobinator.bob"]
|
||||
@@ -105,8 +106,8 @@ class ModuleApiTestCase(BaseModuleApiTestCase):
|
||||
self.assertEqual(email.address, "bob@bobinator.bob")
|
||||
|
||||
# Should these be 0?
|
||||
self.assertEqual(email.validated_at, 0)
|
||||
self.assertEqual(email.added_at, 0)
|
||||
self.assertEqual(email.validated_at, register_ts)
|
||||
self.assertEqual(email.added_at, register_ts)
|
||||
|
||||
# Check that the displayname was assigned
|
||||
displayname = self.get_success(
|
||||
|
||||
Reference in New Issue
Block a user