mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-14 23:08:07 -04:00
Handle future dates
This commit is contained in:
@@ -1423,6 +1423,33 @@ def mock_get_billable_units(mocker):
|
||||
'app.service_api_client.get_billable_units', side_effect=_get_usage)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_future_usage(mocker, service_one, fake_uuid):
|
||||
def _get_usage(service_id, year=None):
|
||||
return [
|
||||
{
|
||||
'notification_type': 'sms', 'international': False,
|
||||
'credits': 0, 'rate_multiplier': 1, 'rate': 1.58, 'billing_units': 0
|
||||
},
|
||||
{
|
||||
'notification_type': 'email', 'international': False,
|
||||
'credits': 0, 'rate_multiplier': 1, 'rate': 0, 'billing_units': 0
|
||||
}
|
||||
]
|
||||
|
||||
return mocker.patch(
|
||||
'app.service_api_client.get_service_usage', side_effect=_get_usage)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_future_billable_units(mocker):
|
||||
def _get_usage(service_id, year):
|
||||
return []
|
||||
|
||||
return mocker.patch(
|
||||
'app.service_api_client.get_billable_units', side_effect=_get_usage)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_events(mocker):
|
||||
def _create_event(event_type, event_data):
|
||||
|
||||
Reference in New Issue
Block a user