notify-admin-866 improve tests with noqa comments

This commit is contained in:
Kenneth Kehl
2023-10-26 08:33:59 -07:00
parent 1c75f9abeb
commit 90025ded54
4 changed files with 10 additions and 18 deletions

View File

@@ -5,9 +5,9 @@ from werkzeug.exceptions import Forbidden
from app.utils.user import user_has_permissions
@pytest.mark.parametrize( # noqa: PT007 # Ignoring wrong values type because of the list unpacking in the test.
@pytest.mark.parametrize(
"permissions",
(
[
[
# Route has one of the permissions which the user has
"manage_service"
@@ -25,7 +25,7 @@ from app.utils.user import user_has_permissions
[
# Route has no specific permissions required
],
),
],
)
def test_permissions(
client_request,
@@ -48,14 +48,14 @@ def test_permissions(
index()
@pytest.mark.parametrize( # noqa: PT007 # Ignoring wrong values type because of the list unpacking in the test.
@pytest.mark.parametrize(
"permissions",
(
[
[
# Route has a permission which the user doesnt have
"send_messages"
],
),
],
)
def test_permissions_forbidden(
client_request,