fix(test): update 11 failing tests to match refactored status tracking and API changes

- Update test_bulk_operations.py: Use FileProcessingStep instead of ProcessingLog for status filter tests
- Update test_file_listing.py: Use FileProcessingStep for processing status determination tests
- Update test_file_detail_endpoints.py: Replace hash_file with check_text in step summary test
- Update test_path_traversal_security.py: Import get_unique_filepath_with_counter from correct module
- Update test_process_document.py: Match current duplicate handling behavior (creates new record)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-12 02:54:46 +00:00
parent 21ae70f8d5
commit ad39ee7afa
5 changed files with 55 additions and 54 deletions
+7 -3
View File
@@ -163,10 +163,14 @@ def test_process_document_duplicate_file(db_session, tmp_path):
# Verify that duplicate was detected
assert result["status"] == "duplicate_file"
assert result["file_id"] == existing_id
assert result["original_file_id"] == existing_id
# Verify only one FileRecord exists
assert db_session.query(FileRecord).count() == 1
# A new duplicate FileRecord is created alongside the original
assert db_session.query(FileRecord).count() == 2
duplicate = db_session.query(FileRecord).filter(FileRecord.is_duplicate.is_(True)).first()
assert duplicate is not None
assert duplicate.duplicate_of_id == existing_id
assert result["file_id"] == duplicate.id
@pytest.mark.unit