Merge pull request #925 from alphagov/feat-use-intl-provider-send-sms

Feat use intl provider send sms
This commit is contained in:
Imdad Ahad
2017-04-27 15:33:45 +01:00
committed by GitHub
5 changed files with 91 additions and 21 deletions

View File

@@ -35,16 +35,23 @@ def test_can_get_all_providers(restore_provider_details):
assert len(get_provider_details()) == 5
def test_can_get_sms_providers(restore_provider_details):
def test_can_get_sms_non_international_providers(restore_provider_details):
sms_providers = get_provider_details_by_notification_type('sms')
assert len(sms_providers) == 3
assert all('sms' == prov.notification_type for prov in sms_providers)
def test_can_get_sms_providers_in_order_of_priority(restore_provider_details):
providers = get_provider_details_by_notification_type('sms')
def test_can_get_sms_international_providers(restore_provider_details):
sms_providers = get_provider_details_by_notification_type('sms', True)
assert len(sms_providers) == 1
assert all('sms' == prov.notification_type for prov in sms_providers)
assert all(prov.supports_international for prov in sms_providers)
assert providers[0].priority < providers[1].priority < providers[2].priority
def test_can_get_sms_providers_in_order_of_priority(restore_provider_details):
providers = get_provider_details_by_notification_type('sms', False)
assert providers[0].priority < providers[1].priority
def test_can_get_email_providers_in_order_of_priority(restore_provider_details):