Fix typo and update test now that we expect sent for international

This commit is contained in:
Imdad Ahad
2017-04-27 16:57:04 +01:00
parent c5bd685cef
commit e450f15b2b
2 changed files with 40 additions and 7 deletions

View File

@@ -474,7 +474,6 @@ def test_should_update_billable_units_according_to_research_mode_and_key_type(no
assert sample_notification.billable_units == billable_units
<<<<<<< HEAD
def test_should_send_sms_to_international_providers(
restore_provider_details,
sample_sms_template_with_html,
@@ -529,13 +528,47 @@ def test_should_send_sms_to_international_providers(
assert notification_uk.status == 'sending'
assert notification_uk.sent_by == 'firetext'
assert notification_int.status == 'sending'
assert notification_int.status == 'sent'
assert notification_int.sent_by == 'mmg'
def test_should_send_international_sms_with_formatted_phone_number():
assert 1 == 2
def test_should_send_international_sms_with_formatted_phone_number(
notify_db,
sample_template,
mocker
):
notification = create_notification(
template=sample_template,
to_field="+6011-17224412",
international=True
)
send_notification_mock = mocker.patch('app.mmg_client.send_sms')
mocker.patch('app.delivery.send_to_providers.send_sms_response')
send_to_providers.send_sms_to_provider(
notification
)
assert send_notification_mock.called is True
def test_should_set_international_phone_number_to_sent_status():
assert 1 == 2
def test_should_set_international_phone_number_to_sent_status(
notify_db,
sample_template,
mocker
):
notification = create_notification(
template=sample_template,
to_field="+6011-17224412",
international=True
)
mocker.patch('app.mmg_client.send_sms')
mocker.patch('app.delivery.send_to_providers.send_sms_response')
send_to_providers.send_sms_to_provider(
notification
)
assert notification.status == 'sent'