mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
Reformatted a handful more tests
Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
@@ -56,7 +56,7 @@ def test_post_free_sms_fragment_limit_for_year_endpoint(mocker, api_user_active)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"func, expected_url",
|
||||
("func", "expected_url"),
|
||||
[
|
||||
(
|
||||
BillingAPIClient.get_data_for_volumes_by_service_report,
|
||||
|
||||
@@ -327,7 +327,7 @@ def test_cancel_job(mocker):
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"job_data, expected_cache_value",
|
||||
("job_data", "expected_cache_value"),
|
||||
[
|
||||
(
|
||||
[{"data": [1, 2, 3], "statistics": []}],
|
||||
@@ -364,7 +364,7 @@ def test_has_jobs_sets_cache(
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"cache_value, return_value",
|
||||
("cache_value", "return_value"),
|
||||
[
|
||||
(b"true", True),
|
||||
(b"false", False),
|
||||
|
||||
@@ -4,7 +4,7 @@ from app.notify_client.notification_api_client import NotificationApiClient
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"arguments,expected_call",
|
||||
("arguments", "expected_call"),
|
||||
[
|
||||
({}, {"url": "/service/abcd1234/notifications", "params": {}}),
|
||||
(
|
||||
@@ -63,7 +63,7 @@ def test_client_gets_notifications_for_service_and_job_by_page(
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"arguments,expected_call",
|
||||
("arguments", "expected_call"),
|
||||
[
|
||||
(
|
||||
{"to": "2028675309"},
|
||||
|
||||
@@ -7,12 +7,12 @@ from app import organizations_client
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
(
|
||||
"client_method,"
|
||||
"expected_cache_get_calls,"
|
||||
"cache_value,"
|
||||
"expected_api_calls,"
|
||||
"expected_cache_set_calls,"
|
||||
"expected_return_value,"
|
||||
"client_method",
|
||||
"expected_cache_get_calls",
|
||||
"cache_value",
|
||||
"expected_api_calls",
|
||||
"expected_cache_set_calls",
|
||||
"expected_return_value",
|
||||
),
|
||||
[
|
||||
(
|
||||
@@ -132,8 +132,8 @@ def test_deletes_domain_cache(
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"post_data, expected_cache_delete_calls",
|
||||
(
|
||||
("post_data", "expected_cache_delete_calls"),
|
||||
[
|
||||
(
|
||||
{"foo": "bar"},
|
||||
[
|
||||
@@ -149,7 +149,7 @@ def test_deletes_domain_cache(
|
||||
call("domains"),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_update_organization_when_not_updating_org_type(
|
||||
mocker,
|
||||
|
||||
@@ -109,8 +109,8 @@ def test_get_precompiled_template(mocker):
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"template_data, extra_args, expected_count",
|
||||
(
|
||||
("template_data", "extra_args", "expected_count"),
|
||||
[
|
||||
(
|
||||
[],
|
||||
{},
|
||||
@@ -137,7 +137,7 @@ def test_get_precompiled_template(mocker):
|
||||
{"template_type": "email"},
|
||||
1,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_client_returns_count_of_service_templates(
|
||||
notify_admin,
|
||||
@@ -159,13 +159,13 @@ def test_client_returns_count_of_service_templates(
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
(
|
||||
"client_method,"
|
||||
"extra_args,"
|
||||
"expected_cache_get_calls,"
|
||||
"cache_value,"
|
||||
"expected_api_calls,"
|
||||
"expected_cache_set_calls,"
|
||||
"expected_return_value,"
|
||||
"client_method",
|
||||
"extra_args",
|
||||
"expected_cache_get_calls",
|
||||
"cache_value",
|
||||
"expected_api_calls",
|
||||
"expected_cache_set_calls",
|
||||
"expected_return_value",
|
||||
),
|
||||
[
|
||||
(
|
||||
@@ -374,7 +374,7 @@ def test_returns_value_from_cache(
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"client, method, extra_args, extra_kwargs",
|
||||
("client", "method", "extra_args", "extra_kwargs"),
|
||||
[
|
||||
(service_api_client, "update_service", [SERVICE_ONE_ID], {"name": "foo"}),
|
||||
(
|
||||
@@ -450,7 +450,7 @@ def test_deletes_service_cache(
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"method, extra_args, expected_cache_deletes",
|
||||
("method", "extra_args", "expected_cache_deletes"),
|
||||
[
|
||||
(
|
||||
"create_service_template",
|
||||
|
||||
@@ -141,11 +141,11 @@ def test_client_converts_admin_permissions_to_db_permissions_on_add_to_service(
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
(
|
||||
"expected_cache_get_calls,"
|
||||
"cache_value,"
|
||||
"expected_api_calls,"
|
||||
"expected_cache_set_calls,"
|
||||
"expected_return_value,"
|
||||
"expected_cache_get_calls",
|
||||
"cache_value",
|
||||
"expected_api_calls",
|
||||
"expected_cache_set_calls",
|
||||
"expected_return_value",
|
||||
),
|
||||
[
|
||||
(
|
||||
@@ -192,8 +192,8 @@ def test_returns_value_from_cache(
|
||||
assert mock_redis_set.call_args_list == expected_cache_set_calls
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"client, method, extra_args, extra_kwargs",
|
||||
@pytest.mark.parametrize( # noqa: PT014 # Duplicate add_user_to_service has different params for each
|
||||
("client", "method", "extra_args", "extra_kwargs"),
|
||||
[
|
||||
(
|
||||
user_api_client,
|
||||
|
||||
Reference in New Issue
Block a user