mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-07-29 15:24:54 +00:00
test: use HTTPStatus enum instead of bare integers in security test assertions
This commit is contained in:
@@ -189,7 +189,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"]}
|
||||
@@ -280,7 +280,7 @@ class TestEmailDocumentPermissionBoundary:
|
||||
},
|
||||
format="json",
|
||||
)
|
||||
assert response.status_code == 403
|
||||
assert response.status_code == HTTPStatus.FORBIDDEN
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@@ -314,7 +314,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