mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -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:
@@ -2169,7 +2169,7 @@ def test_should_show_page_for_a_deleted_template(
|
||||
def test_route_permissions(
|
||||
route,
|
||||
mocker,
|
||||
app_,
|
||||
notify_admin,
|
||||
client,
|
||||
api_user_active,
|
||||
service_one,
|
||||
@@ -2181,7 +2181,7 @@ def test_route_permissions(
|
||||
return_value='2012-01-01 12:00:00')
|
||||
validate_route_permission(
|
||||
mocker,
|
||||
app_,
|
||||
notify_admin,
|
||||
"GET",
|
||||
200,
|
||||
url_for(
|
||||
@@ -2196,7 +2196,7 @@ def test_route_permissions(
|
||||
|
||||
def test_route_permissions_for_choose_template(
|
||||
mocker,
|
||||
app_,
|
||||
notify_admin,
|
||||
client,
|
||||
api_user_active,
|
||||
mock_get_template_folders,
|
||||
@@ -2207,7 +2207,7 @@ def test_route_permissions_for_choose_template(
|
||||
mocker.patch('app.job_api_client.get_job')
|
||||
validate_route_permission(
|
||||
mocker,
|
||||
app_,
|
||||
notify_admin,
|
||||
"GET",
|
||||
200,
|
||||
url_for(
|
||||
@@ -2227,7 +2227,7 @@ def test_route_permissions_for_choose_template(
|
||||
def test_route_invalid_permissions(
|
||||
route,
|
||||
mocker,
|
||||
app_,
|
||||
notify_admin,
|
||||
client,
|
||||
api_user_active,
|
||||
service_one,
|
||||
@@ -2236,7 +2236,7 @@ def test_route_invalid_permissions(
|
||||
):
|
||||
validate_route_permission(
|
||||
mocker,
|
||||
app_,
|
||||
notify_admin,
|
||||
"GET",
|
||||
403,
|
||||
url_for(
|
||||
|
||||
Reference in New Issue
Block a user