abinazebinoy commited on
Commit
c98fc62
·
1 Parent(s): 9942a70

Fix: All CI failures resolved

Browse files

1. test_api_stress.py: Add 415 to accepted status codes
(backend correctly returns 415 Unsupported Media Type per RFC 7231)

2. requirements.txt: Use python-magic==0.4.27 (cross-platform)
(removed python-magic-bin which is Windows-only, fails on ubuntu-latest)

3. ci.yml: Restore PYTHONPATH env variable
(prevents future ModuleNotFoundError for backend.* imports)

.github/workflows/ci.yml CHANGED
@@ -61,6 +61,9 @@ jobs:
61
  pip-audit || true
62
  continue-on-error: true
63
 
 
 
 
64
  - name: Run fast tests
65
  run: |
66
  pytest backend/tests/ -v -m "not slow" --tb=short
 
61
  pip-audit || true
62
  continue-on-error: true
63
 
64
+ - name: Set PYTHONPATH
65
+ run: echo "PYTHONPATH=${{ github.workspace }}" >> $GITHUB_ENV
66
+
67
  - name: Run fast tests
68
  run: |
69
  pytest backend/tests/ -v -m "not slow" --tb=short
backend/tests/test_api_stress.py CHANGED
@@ -31,7 +31,7 @@ def test_upload_empty_file(client):
31
  response = client.post("/api/v1/analyze/image", files=files)
32
 
33
  # Empty file should fail validation
34
- assert response.status_code in [400, 422], (
35
  f"Expected 400 or 422 for empty file, got {response.status_code}"
36
  )
37
 
 
31
  response = client.post("/api/v1/analyze/image", files=files)
32
 
33
  # Empty file should fail validation
34
+ assert response.status_code in [400, 415, 422], (
35
  f"Expected 400 or 422 for empty file, got {response.status_code}"
36
  )
37