mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-08-08 03:43:20 +00:00
test: use HTTPStatus enum instead of bare integers in security test assertions
This commit is contained in:
@@ -195,7 +195,7 @@ class TestAiChatAllDocumentsPermissionBoundary:
|
||||
format="json",
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.status_code == HTTPStatus.OK
|
||||
mock_stream_chat.assert_called_once()
|
||||
_, kwargs = mock_stream_chat.call_args
|
||||
visible_ids = {doc.pk for doc in kwargs["documents"]}
|
||||
@@ -297,7 +297,7 @@ class TestEmailDocumentPermissionBoundary:
|
||||
},
|
||||
format="json",
|
||||
)
|
||||
assert response.status_code == 403
|
||||
assert response.status_code == HTTPStatus.FORBIDDEN
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@@ -331,7 +331,7 @@ class TestBulkEditChangePermissionBoundary:
|
||||
},
|
||||
format="json",
|
||||
)
|
||||
assert response.status_code == 403
|
||||
assert response.status_code == HTTPStatus.FORBIDDEN
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
|
||||
Reference in New Issue
Block a user