From 1c77f8d60f0c3199ed8f31f20d549bfc69dbe73d Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Thu, 16 Jan 2025 09:27:32 -0800 Subject: [PATCH] fix test --- tests/app/notify_client/test_billing_client.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/app/notify_client/test_billing_client.py b/tests/app/notify_client/test_billing_client.py index 65898fec2..c102645d2 100644 --- a/tests/app/notify_client/test_billing_client.py +++ b/tests/app/notify_client/test_billing_client.py @@ -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) 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( "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) mock_get.assert_called_once_with( expected_url, params={"financial_year_start": 1999}