invitations: Fix lint errors in test_queue_workers.

This commit is contained in:
Rohitt Vashishtha 2017-12-07 11:15:18 +05:30 committed by Greg Price
parent 6787fbd547
commit 9c2a28b6df
1 changed files with 5 additions and 5 deletions

View File

@ -224,7 +224,7 @@ class WorkerTest(ZulipTestCase):
invitor = self.example_user('iago') invitor = self.example_user('iago')
prereg_alice = PreregistrationUser.objects.create( prereg_alice = PreregistrationUser.objects.create(
email=self.nonreg_email('alice'), referred_by=invitor, realm=invitor.realm) email=self.nonreg_email('alice'), referred_by=invitor, realm=invitor.realm)
prereg_bob = PreregistrationUser.objects.create( PreregistrationUser.objects.create(
email=self.nonreg_email('bob'), referred_by=invitor, realm=invitor.realm) email=self.nonreg_email('bob'), referred_by=invitor, realm=invitor.realm)
data = [ data = [
dict(prereg_id=prereg_alice.id, referrer_id=invitor.id, email_body=None), dict(prereg_id=prereg_alice.id, referrer_id=invitor.id, email_body=None),
@ -240,10 +240,10 @@ class WorkerTest(ZulipTestCase):
worker = queue_processors.ConfirmationEmailWorker() worker = queue_processors.ConfirmationEmailWorker()
worker.setup() worker.setup()
with patch('zerver.worker.queue_processors.do_send_confirmation_email'), \ with patch('zerver.worker.queue_processors.do_send_confirmation_email'), \
patch('zerver.worker.queue_processors.create_confirmation_link'), \ patch('zerver.worker.queue_processors.create_confirmation_link'), \
patch('zerver.worker.queue_processors.send_future_email') \ patch('zerver.worker.queue_processors.send_future_email') \
as send_mock, \ as send_mock, \
patch('logging.info'): patch('logging.info'):
worker.start() worker.start()
self.assertEqual(send_mock.call_count, 2) self.assertEqual(send_mock.call_count, 2)