mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 08:28:15 -04:00
@@ -19,14 +19,14 @@ svg_filename = "test.svg"
|
|||||||
upload_id = "test_uuid"
|
upload_id = "test_uuid"
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture()
|
||||||
def upload_filename(fake_uuid):
|
def upload_filename(fake_uuid):
|
||||||
return EMAIL_LOGO_LOCATION_STRUCTURE.format(
|
return EMAIL_LOGO_LOCATION_STRUCTURE.format(
|
||||||
temp=TEMP_TAG.format(user_id=fake_uuid), unique_id=upload_id, filename=filename
|
temp=TEMP_TAG.format(user_id=fake_uuid), unique_id=upload_id, filename=filename
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture()
|
||||||
def bucket_credentials(notify_admin):
|
def bucket_credentials(notify_admin):
|
||||||
return notify_admin.config["LOGO_UPLOAD_BUCKET"]
|
return notify_admin.config["LOGO_UPLOAD_BUCKET"]
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ bucket_credentials = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture()
|
||||||
def vcap_services():
|
def vcap_services():
|
||||||
return {
|
return {
|
||||||
"aws-elasticache-redis": [{"credentials": {"uri": "redis://xxx:6379"}}],
|
"aws-elasticache-redis": [{"credentials": {"uri": "redis://xxx:6379"}}],
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ def test_raises_on_invalid_navigation_item(client_request, navigation_instance):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"endpoint, selected_nav_item",
|
("endpoint", "selected_nav_item"),
|
||||||
[
|
[
|
||||||
("main.choose_template", "Send messages"),
|
("main.choose_template", "Send messages"),
|
||||||
("main.manage_users", "Team members"),
|
("main.manage_users", "Team members"),
|
||||||
@@ -392,7 +392,7 @@ def test_a_page_should_nave_selected_navigation_item(
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"endpoint, selected_nav_item",
|
("endpoint", "selected_nav_item"),
|
||||||
[
|
[
|
||||||
("main.organization_dashboard", "Usage"),
|
("main.organization_dashboard", "Usage"),
|
||||||
("main.manage_org_users", "Team members"),
|
("main.manage_org_users", "Team members"),
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ def test_sum_of_statistics_sums_inputs():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"emails_failed,emails_requested,expected_failure_rate",
|
("emails_failed", "emails_requested", "expected_failure_rate"),
|
||||||
[(0, 0, "0"), (0, 1, "0.0"), (1, 3, "33.3")],
|
[(0, 0, "0"), (0, 1, "0.0"), (1, 3, "33.3")],
|
||||||
)
|
)
|
||||||
def test_add_rates_sets_email_failure_rate(
|
def test_add_rates_sets_email_failure_rate(
|
||||||
@@ -72,7 +72,7 @@ def test_add_rates_sets_email_failure_rate(
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"sms_failed,sms_requested,expected_failure_rate",
|
("sms_failed", "sms_requested", "expected_failure_rate"),
|
||||||
[(0, 0, "0"), (0, 1, "0.0"), (1, 3, "33.3")],
|
[(0, 0, "0"), (0, 1, "0.0"), (1, 3, "33.3")],
|
||||||
)
|
)
|
||||||
def test_add_rates_sets_sms_failure_rate(
|
def test_add_rates_sets_sms_failure_rate(
|
||||||
@@ -121,7 +121,7 @@ def test_service_statistics_by_state():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"failed, delivered, expected_failure_rate",
|
("failed", "delivered", "expected_failure_rate"),
|
||||||
[(0, 0, 0), (0, 1, 0), (1, 1, 50), (1, 0, 100), (1, 4, 20)],
|
[(0, 0, 0), (0, 1, 0), (1, 1, 50), (1, 0, 100), (1, 4, 20)],
|
||||||
)
|
)
|
||||||
def test_add_rate_to_job_calculates_rate(failed, delivered, expected_failure_rate):
|
def test_add_rate_to_job_calculates_rate(failed, delivered, expected_failure_rate):
|
||||||
|
|||||||
Reference in New Issue
Block a user