Fixed tests

This commit is contained in:
Jonathan Bobel
2023-11-16 12:26:35 -05:00
parent 06a15c5afc
commit 6cee00929e
2 changed files with 4 additions and 3 deletions

View File

@@ -284,6 +284,7 @@ def init_app(application):
@application.context_processor
def _attach_current_global_daily_messages():
global global_limit
remaining_global_messages = 0
if current_app:
if request.view_args:
@@ -302,8 +303,8 @@ def init_app(application):
"count"
)
return {
"global_message_limit": global_limit,
"daily_global_messages_remaining": remaining_global_messages,
"global_message_limit": global_limit
}
@application.before_request

View File

@@ -1531,7 +1531,7 @@ def test_service_dashboard_shows_usage(
assert normalize_spaces(page.select_one("[data-key=usage]").text) == (
"Daily Usage Remaining "
"40,000 "
"251,800 "
"$29.85 "
"spent on text messages"
# Disabled for pilot
@@ -1566,4 +1566,4 @@ def test_service_dashboard_shows_free_allowance(
usage_text = normalize_spaces(page.select_one("[data-key=usage]").text)
assert "spent on text messages" not in usage_text
assert "Daily Usage Remaining -209,000 249,000" in usage_text
assert "Daily Usage Remaining 1,000 249,000" in usage_text