mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
fix test
This commit is contained in:
@@ -10,11 +10,16 @@ def test_get_free_sms_fragment_limit_for_year_correct_endpoint(mocker, api_user_
|
|||||||
expected_url = "/service/{}/billing/free-sms-fragment-limit".format(service_id)
|
expected_url = "/service/{}/billing/free-sms-fragment-limit".format(service_id)
|
||||||
client = BillingAPIClient()
|
client = BillingAPIClient()
|
||||||
|
|
||||||
mock_get = mocker.patch("app.notify_client.billing_api_client.BillingAPIClient.get")
|
mock_get = mocker.patch(
|
||||||
|
"app.notify_client.billing_api_client.BillingAPIClient.get",
|
||||||
|
return_value={"free_sms_fragment_limit": 0},
|
||||||
|
)
|
||||||
mocker.patch(
|
mocker.patch(
|
||||||
"app.notify_client.billing_api_client.redis_client.get", return_value=None
|
"app.notify_client.billing_api_client.redis_client.get", return_value=None
|
||||||
)
|
)
|
||||||
|
|
||||||
|
mocker.patch("app.notify_client.billing_api_client.redis_client.set")
|
||||||
|
|
||||||
client.get_free_sms_fragment_limit_for_year(service_id, year=1999)
|
client.get_free_sms_fragment_limit_for_year(service_id, year=1999)
|
||||||
mock_get.assert_called_once_with(
|
mock_get.assert_called_once_with(
|
||||||
expected_url, params={"financial_year_start": 1999}
|
expected_url, params={"financial_year_start": 1999}
|
||||||
|
|||||||
Reference in New Issue
Block a user