mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
Ignoring two specific warnings about wrong values type
The test makes use of list item unpacking and expects the parameter data structure to allow for that. It does not make sense to modify the code in this case just to make test format linting pass. Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
@@ -5,27 +5,27 @@ from werkzeug.exceptions import Forbidden
|
||||
from app.utils.user import user_has_permissions
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@pytest.mark.parametrize( # noqa: PT007 # Ignoring wrong values type because of the list unpacking in the test.
|
||||
"permissions",
|
||||
[
|
||||
(
|
||||
(
|
||||
[
|
||||
# Route has one of the permissions which the user has
|
||||
"manage_service"
|
||||
),
|
||||
(
|
||||
],
|
||||
[
|
||||
# Route has more than one of the permissions which the user has
|
||||
"manage_templates",
|
||||
"manage_service",
|
||||
),
|
||||
(
|
||||
],
|
||||
[
|
||||
# Route has one of the permissions which the user has, and one they do not
|
||||
"manage_service",
|
||||
"send_messages",
|
||||
),
|
||||
(
|
||||
],
|
||||
[
|
||||
# Route has no specific permissions required
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
)
|
||||
def test_permissions(
|
||||
client_request,
|
||||
@@ -48,14 +48,14 @@ def test_permissions(
|
||||
index()
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@pytest.mark.parametrize( # noqa: PT007 # Ignoring wrong values type because of the list unpacking in the test.
|
||||
"permissions",
|
||||
[
|
||||
(
|
||||
(
|
||||
[
|
||||
# Route has a permission which the user doesn’t have
|
||||
"send_messages"
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
)
|
||||
def test_permissions_forbidden(
|
||||
client_request,
|
||||
|
||||
Reference in New Issue
Block a user