mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Merge pull request #1288 from alphagov/add-new-rate-logic
Wire in the new API method that calculates the total cost and total billable units
This commit is contained in:
@@ -1335,6 +1335,15 @@ def mock_get_usage(mocker, service_one, fake_uuid):
|
||||
'app.service_api_client.get_service_usage', side_effect=_get_usage)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_yearly_sms_unit_count_and_cost(mocker, service_one, fake_uuid):
|
||||
def _get_usage(service_id, year=None):
|
||||
return {"billable_sms_units": 100, "total_cost": 200.0}
|
||||
|
||||
return mocker.patch(
|
||||
'app.service_api_client.get_yearly_sms_unit_count_and_cost', side_effect=_get_usage)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_billable_units(mocker):
|
||||
def _get_usage(service_id, year):
|
||||
|
||||
Reference in New Issue
Block a user