mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
make tests use mmg 100% of the time by default
we randomly choose between sms providers now - this means that tests may sometimes send firetext and sometimes mmg, so we'd need to patch out different HTTP calls, expect different values in sent_by, etc etc. To ensure tests are consistent, add a new fixture that is always used by notify_db_session, which sets the priorities of the sms providers to 100% mmg 0% firetext. if you need to test other values, then you should set the values manually in the test file
This commit is contained in:
@@ -224,17 +224,17 @@ def test_dao_get_provider_stats(notify_db_session):
|
||||
assert result[0].created_by_name is None
|
||||
assert result[0].current_month_billable_sms == 0
|
||||
|
||||
assert result[1].identifier == 'mmg'
|
||||
assert result[1].display_name == 'MMG'
|
||||
assert result[1].supports_international is True
|
||||
assert result[1].identifier == 'firetext'
|
||||
assert result[1].notification_type == 'sms'
|
||||
assert result[1].supports_international is False
|
||||
assert result[1].active is True
|
||||
assert result[1].current_month_billable_sms == 4
|
||||
assert result[1].current_month_billable_sms == 5
|
||||
|
||||
assert result[2].identifier == 'firetext'
|
||||
assert result[2].notification_type == 'sms'
|
||||
assert result[2].supports_international is False
|
||||
assert result[2].identifier == 'mmg'
|
||||
assert result[2].display_name == 'MMG'
|
||||
assert result[2].supports_international is True
|
||||
assert result[2].active is True
|
||||
assert result[2].current_month_billable_sms == 5
|
||||
assert result[2].current_month_billable_sms == 4
|
||||
|
||||
assert result[3].identifier == 'dvla'
|
||||
assert result[3].current_month_billable_sms == 0
|
||||
|
||||
Reference in New Issue
Block a user