mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-04 05:31:44 -04:00
Rename "app_" fixture to "notify_admin"
This naming was introduced in 2016 without explanation [1]. I find it confusing because: - It's reminiscent of "_app", which is a Python convention indicating the variable is internal, so maybe avoid using it. - It suggests there's some other "app" fixture I should be using (there isn't, though). The Python style guide describes using an underscore suffix to avoid clashes with inbuilt names [1], which is sort of applicable if we need to import the "app" module [2]. However, we can also avoid clashes by choosing a different name, without the strange underscore. [1]:3b1d521c10[2]:78824f54fd/tests/app/main/views/test_forgot_password.py (L5)
This commit is contained in:
@@ -180,7 +180,7 @@ def test_spreadsheet_checks_for_bad_arguments(args, kwargs):
|
||||
),
|
||||
])
|
||||
def test_generate_notifications_csv_without_job(
|
||||
app_,
|
||||
notify_admin,
|
||||
mocker,
|
||||
created_by_name,
|
||||
expected_content,
|
||||
@@ -224,7 +224,7 @@ def test_generate_notifications_csv_without_job(
|
||||
),
|
||||
])
|
||||
def test_generate_notifications_csv_returns_correct_csv_file(
|
||||
app_,
|
||||
notify_admin,
|
||||
mocker,
|
||||
_get_notifications_csv_mock,
|
||||
original_file_contents,
|
||||
@@ -242,7 +242,7 @@ def test_generate_notifications_csv_returns_correct_csv_file(
|
||||
|
||||
|
||||
def test_generate_notifications_csv_only_calls_once_if_no_next_link(
|
||||
app_,
|
||||
notify_admin,
|
||||
_get_notifications_csv_mock,
|
||||
):
|
||||
list(generate_notifications_csv(service_id='1234'))
|
||||
@@ -252,7 +252,7 @@ def test_generate_notifications_csv_only_calls_once_if_no_next_link(
|
||||
|
||||
@pytest.mark.parametrize("job_id", ["some", None])
|
||||
def test_generate_notifications_csv_calls_twice_if_next_link(
|
||||
app_,
|
||||
notify_admin,
|
||||
mocker,
|
||||
job_id,
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user