mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -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:
@@ -2071,7 +2071,7 @@ def test_ready_to_go_live(
|
||||
])
|
||||
def test_route_permissions(
|
||||
mocker,
|
||||
app_,
|
||||
notify_admin,
|
||||
client,
|
||||
api_user_active,
|
||||
service_one,
|
||||
@@ -2085,7 +2085,7 @@ def test_route_permissions(
|
||||
):
|
||||
validate_route_permission(
|
||||
mocker,
|
||||
app_,
|
||||
notify_admin,
|
||||
"GET",
|
||||
200,
|
||||
url_for(route, service_id=service_one['id']),
|
||||
@@ -2107,7 +2107,7 @@ def test_route_permissions(
|
||||
])
|
||||
def test_route_invalid_permissions(
|
||||
mocker,
|
||||
app_,
|
||||
notify_admin,
|
||||
client,
|
||||
api_user_active,
|
||||
service_one,
|
||||
@@ -2117,7 +2117,7 @@ def test_route_invalid_permissions(
|
||||
):
|
||||
validate_route_permission(
|
||||
mocker,
|
||||
app_,
|
||||
notify_admin,
|
||||
"GET",
|
||||
403,
|
||||
url_for(route, service_id=service_one['id']),
|
||||
@@ -2135,7 +2135,7 @@ def test_route_invalid_permissions(
|
||||
])
|
||||
def test_route_for_platform_admin(
|
||||
mocker,
|
||||
app_,
|
||||
notify_admin,
|
||||
client,
|
||||
platform_admin_user,
|
||||
service_one,
|
||||
@@ -2149,7 +2149,7 @@ def test_route_for_platform_admin(
|
||||
):
|
||||
validate_route_permission(
|
||||
mocker,
|
||||
app_,
|
||||
notify_admin,
|
||||
"GET",
|
||||
200,
|
||||
url_for(route, service_id=service_one['id']),
|
||||
|
||||
Reference in New Issue
Block a user