invites: Delete old compat code in the invites queue worker.

1.7.* is old enough at this point that we can clean up this code.
This commit is contained in:
Mateusz Mandera
2021-02-11 18:21:44 +01:00
committed by Tim Abbott
parent d1c24d3f67
commit b9c1fed18c
2 changed files with 7 additions and 16 deletions

View File

@@ -445,8 +445,6 @@ class WorkerTest(ZulipTestCase):
dict(prereg_id=prereg_alice.id, referrer_id=inviter.id, email_body=None),
# Nonexistent prereg_id, as if the invitation was deleted
dict(prereg_id=-1, referrer_id=inviter.id, email_body=None),
# Form with `email` is from versions up to Zulip 1.7.1
dict(email=self.nonreg_email("bob"), referrer_id=inviter.id, email_body=None),
]
for element in data:
fake_client.enqueue("invites", element)
@@ -458,7 +456,7 @@ class WorkerTest(ZulipTestCase):
"zerver.worker.queue_processors.send_future_email"
) as send_mock:
worker.start()
self.assertEqual(send_mock.call_count, 2)
self.assertEqual(send_mock.call_count, 1)
def test_error_handling(self) -> None:
processed = []