mirror of https://github.com/zulip/zulip.git
tests: Eliminate instances of time_machine.travel without tick=False.
None of these tests seem to want to have tick=True, which is the default. Letting the clock tick without a reason introduces the possibility of nondeterministic test failures depending on the execution time.
This commit is contained in:
parent
247d4626a0
commit
11390b70be
|
@ -26,7 +26,7 @@ class UnclaimedAttachmentTest(UploadSerializeMixin, ZulipTestCase):
|
|||
uploader = self.example_user("hamlet")
|
||||
self.login_user(uploader)
|
||||
|
||||
with time_machine.travel(when):
|
||||
with time_machine.travel(when, tick=False):
|
||||
file_obj = StringIO("zulip!")
|
||||
file_obj.name = filename
|
||||
response = self.assert_json_success(
|
||||
|
|
|
@ -335,7 +335,7 @@ class InviteUserTest(InviteUserBase):
|
|||
|
||||
# We've sent 40 invites "today". Fast-forward 48 hours
|
||||
# and ensure that we can invite more people
|
||||
with time_machine.travel(timezone_now() + datetime.timedelta(hours=48)):
|
||||
with time_machine.travel(timezone_now() + datetime.timedelta(hours=48), tick=False):
|
||||
result = try_invite(5, default_realm_max=30, new_realm_max=20, realm_max=10)
|
||||
self.assert_json_success(result)
|
||||
self.check_sent_emails([f"zulip-{i:02}@zulip.com" for i in range(5)], clear=True)
|
||||
|
|
Loading…
Reference in New Issue