mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
notify-admin-866 improve tests with noqa comments
This commit is contained in:
@@ -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 doesn’t have
|
||||
"send_messages"
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_permissions_forbidden(
|
||||
client_request,
|
||||
|
||||
Reference in New Issue
Block a user