Merge branch 'master' into add-template-version

This commit is contained in:
Rebecca Law
2016-05-13 16:32:57 +01:00
8 changed files with 66 additions and 7 deletions

View File

@@ -7,11 +7,11 @@ from app.dao.provider_details_dao import (
def test_can_get_all_providers(notify_db, notify_db_session):
assert len(get_provider_details()) == 3
assert len(get_provider_details()) == 4
def test_can_get_sms_providers(notify_db, notify_db_session):
assert len(get_provider_details_by_notification_type('sms')) == 2
assert len(get_provider_details_by_notification_type('sms')) == 3
types = [provider.notification_type for provider in get_provider_details_by_notification_type('sms')]
assert all('sms' == notification_type for notification_type in types)
@@ -21,6 +21,7 @@ def test_can_get_sms_providers_in_order(notify_db, notify_db_session):
assert providers[0].identifier == "mmg"
assert providers[1].identifier == "firetext"
assert providers[2].identifier == "loadtesting"
def test_can_get_email_providers_in_order(notify_db, notify_db_session):

View File

@@ -12,11 +12,12 @@ def test_get_provider_details_in_type_and_identifier_order(notify_db, notify_db_
)
assert response.status_code == 200
json_resp = json.loads(response.get_data(as_text=True))['provider_details']
assert len(json_resp) == 3
assert len(json_resp) == 4
assert json_resp[0]['identifier'] == 'ses'
assert json_resp[1]['identifier'] == 'mmg'
assert json_resp[2]['identifier'] == 'firetext'
assert json_resp[3]['identifier'] == 'loadtesting'
def test_get_provider_details_by_id(notify_db, notify_db_session, notify_api):