Make sms code task use a reference too

- makes the fire text callback behave in consistent way
This commit is contained in:
Martyn Inglis
2016-03-10 15:51:11 +00:00
parent 1f22f2b7cc
commit 2922712f0b
5 changed files with 42 additions and 27 deletions

View File

@@ -619,7 +619,7 @@ def test_should_send_sms_code(mocker):
mocker.patch('app.firetext_client.send_sms')
send_sms_code(encrypted_notification)
firetext_client.send_sms.assert_called_once_with(notification['to'], notification['secret_code'])
firetext_client.send_sms.assert_called_once_with(notification['to'], notification['secret_code'], 'send-sms-code')
def test_should_throw_firetext_client_exception(mocker):
@@ -629,7 +629,7 @@ def test_should_throw_firetext_client_exception(mocker):
encrypted_notification = encryption.encrypt(notification)
mocker.patch('app.firetext_client.send_sms', side_effect=FiretextClientException(firetext_error()))
send_sms_code(encrypted_notification)
firetext_client.send_sms.assert_called_once_with(notification['to'], notification['secret_code'])
firetext_client.send_sms.assert_called_once_with(notification['to'], notification['secret_code'], 'send-sms-code')
def test_should_send_email_code(mocker):