Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Kehl committed Jan 16, 2025
1 parent 3e8015e commit 6f7202e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 1 addition & 7 deletions app/main/views/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ def check_feature_flags():
@main.route("/test/feature-flags")
def test_feature_flags():
return jsonify(
{
"FEATURE_ABOUT_PAGE_ENABLED": current_app.config[
"FEATURE_ABOUT_PAGE_ENABLED"
]
}
{"FEATURE_ABOUT_PAGE_ENABLED": current_app.config["FEATURE_ABOUT_PAGE_ENABLED"]}
)


Expand Down Expand Up @@ -235,7 +231,6 @@ def contact():
return render_template(
"views/contact.html",
navigation_links=about_notify_nav(),

)


Expand Down Expand Up @@ -268,7 +263,6 @@ def join_notify():
return render_template(
"views/join-notify.html",
navigation_links=about_notify_nav(),

)


Expand Down
8 changes: 8 additions & 0 deletions tests/app/notify_client/test_billing_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ def test_get_free_sms_fragment_limit_for_year_correct_endpoint(mocker, api_user_
client = BillingAPIClient()

mock_get = mocker.patch("app.notify_client.billing_api_client.BillingAPIClient.get")
mocker.patch(
"app.notify_client.billing_api_client.redis_client.get", return_value=None
)

client.get_free_sms_fragment_limit_for_year(service_id, year=1999)
mock_get.assert_called_once_with(
Expand All @@ -28,6 +31,11 @@ def test_post_free_sms_fragment_limit_for_current_year_endpoint(
)
client = BillingAPIClient()

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.create_or_update_free_sms_fragment_limit(
service_id=service_id, free_sms_fragment_limit=1111
)
Expand Down

0 comments on commit 6f7202e

Please sign in to comment.