Refactor provider switch methods in dao and tests

This commit is contained in:
Imdad Ahad
2017-01-20 16:13:13 +00:00
parent 6a99b89d2e
commit d466265a9d
4 changed files with 70 additions and 57 deletions

View File

@@ -642,18 +642,6 @@ def current_sms_provider():
).first()
@pytest.fixture(scope='function')
def set_primary_sms_provider(identifier='mmg'):
primary_provider = get_provider_details_by_identifier(identifier)
secondary_provider = get_alternative_sms_provider(identifier)
primary_provider.priority = 10
secondary_provider.priority = 20
dao_update_provider_details(primary_provider)
dao_update_provider_details(secondary_provider)
@pytest.fixture(scope='function')
def ses_provider():
return ProviderDetails.query.filter_by(identifier='ses').one()