mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-04 19:38:24 -04:00
Fixed tests
This commit is contained in:
@@ -284,6 +284,7 @@ def init_app(application):
|
|||||||
|
|
||||||
@application.context_processor
|
@application.context_processor
|
||||||
def _attach_current_global_daily_messages():
|
def _attach_current_global_daily_messages():
|
||||||
|
global global_limit
|
||||||
remaining_global_messages = 0
|
remaining_global_messages = 0
|
||||||
if current_app:
|
if current_app:
|
||||||
if request.view_args:
|
if request.view_args:
|
||||||
@@ -302,8 +303,8 @@ def init_app(application):
|
|||||||
"count"
|
"count"
|
||||||
)
|
)
|
||||||
return {
|
return {
|
||||||
|
"global_message_limit": global_limit,
|
||||||
"daily_global_messages_remaining": remaining_global_messages,
|
"daily_global_messages_remaining": remaining_global_messages,
|
||||||
"global_message_limit": global_limit
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@application.before_request
|
@application.before_request
|
||||||
|
|||||||
@@ -1531,7 +1531,7 @@ def test_service_dashboard_shows_usage(
|
|||||||
|
|
||||||
assert normalize_spaces(page.select_one("[data-key=usage]").text) == (
|
assert normalize_spaces(page.select_one("[data-key=usage]").text) == (
|
||||||
"Daily Usage Remaining "
|
"Daily Usage Remaining "
|
||||||
"40,000 "
|
"251,800 "
|
||||||
"$29.85 "
|
"$29.85 "
|
||||||
"spent on text messages"
|
"spent on text messages"
|
||||||
# Disabled for pilot
|
# 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)
|
usage_text = normalize_spaces(page.select_one("[data-key=usage]").text)
|
||||||
assert "spent on text messages" not in 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
|
||||||
|
|||||||
Reference in New Issue
Block a user