Fixed 8 failing tests in the CI pipeline that were caused by:
- Updated Claude default model version
- Resume name conflicts due to unique name constraint
File: tests/test_llm_provider.py
Test: TestModelRegistry::test_get_default_model_claude
Issue: Test expected old Claude model claude-3-5-sonnet-20241022 but system now uses claude-sonnet-4-5-20250929
Fix:
# Before
assert model == "claude-3-5-sonnet-20241022"
# After
assert model == "claude-sonnet-4-5-20250929"File: tests/test_multi_resume_api.py
Tests:
TestResumeAPI::test_create_resumeTestResumeAPI::test_get_resumeTestResumeAPI::test_update_resumeTestResumeAPI::test_delete_resume
Issue: Tests were trying to create resumes with name "Test Resume" which already exists in the system due to unique name constraint
Fix: Updated each test to use unique names:
test_create_resume→"Test Resume API Create"test_get_resume→"Test Resume API Get"test_update_resume→"Test Resume API Update"(with updated name"Updated Resume API")test_delete_resume→"Test Resume API Delete"
File: tests/test_docx_export.py
Tests:
TestDocxExport::test_export_specific_resume_postTestDocxExportIntegration::test_create_and_export_resumeTestDocxExportIntegration::test_tailor_and_export_resume
Issue: Tests were creating resumes with hardcoded names that conflicted with existing resumes
Fix:
- Added
unique_resume_namefixture that generates timestamp-based unique names - Updated all three tests to use the fixture
- Ensures no name conflicts even if tests run multiple times
@pytest.fixture
def unique_resume_name():
"""Generate a unique resume name using timestamp."""
return f"Test_Resume_{int(time.time() * 1000)}"FAILED tests/test_docx_export.py::TestDocxExport::test_export_specific_resume_post
FAILED tests/test_docx_export.py::TestDocxExportIntegration::test_create_and_export_resume
FAILED tests/test_docx_export.py::TestDocxExportIntegration::test_tailor_and_export_resume
FAILED tests/test_llm_provider.py::TestModelRegistry::test_get_default_model_claude
FAILED tests/test_multi_resume_api.py::TestResumeAPI::test_create_resume
FAILED tests/test_multi_resume_api.py::TestResumeAPI::test_get_resume
FAILED tests/test_multi_resume_api.py::TestResumeAPI::test_update_resume
FAILED tests/test_multi_resume_api.py::TestResumeAPI::test_delete_resume
8 failed, 393 passed
============================== 401 passed, 3 warnings in 16.38s ==============================
tests/test_llm_provider.py- Updated Claude model version assertiontests/test_multi_resume_api.py- Updated resume names to be uniquetests/test_docx_export.py- Added unique_resume_name fixture and updated tests
-
Claude Model Test: The system was updated to use
claude-sonnet-4-5-20250929as the default Claude model, but the test still expected the old model version. -
Resume Name Conflicts: The unique resume name constraint (implemented in Issue #19) prevents creating multiple resumes with the same name. Tests were using hardcoded names like "Test Resume" which already existed in the system, causing 409 CONFLICT errors.
By using timestamp-based unique names (Test_Resume_{timestamp}), each test run generates a different name, preventing conflicts even if:
- Tests run multiple times
- Tests run in parallel
- Previous test data persists
All 401 tests now pass:
python -m pytest --tb=short -q
# Result: 401 passed, 3 warnings in 16.38s- Issue #30: Claude multi-provider support
- Issue #38: Agent output truncation
- Issue #19: Duplicate resume names
- Consider using a test database fixture to isolate test data
- Add test cleanup fixtures to remove created resumes after each test
- Use factory patterns for test data generation