Files
bruno 99f3d0c00c
CI - Continuous Integration / Run Tests (push) Failing after 0s
CI - Continuous Integration / Security Scan (push) Failing after 0s
Complete CI/CD Pipeline / Code Quality & Security (push) Failing after 0s
CI - Continuous Integration / Build and Verify (push) Has been skipped
Complete CI/CD Pipeline / Run Tests (push) Has been skipped
Complete CI/CD Pipeline / Build Docker Image (push) Has been skipped
Complete CI/CD Pipeline / Container Security Scan (push) Has been skipped
Complete CI/CD Pipeline / Deploy to Development (GitOps) (push) Has been skipped
Complete CI/CD Pipeline / Deploy to Production (GitOps) (push) Has been skipped
Security Scanning / SAST (Bandit + Semgrep) (push) Failing after 1s
Complete CI/CD Pipeline / Post-deployment Verification (push) Failing after 0s
Complete CI/CD Pipeline / Notify Results (push) Successful in 0s
Security Scanning / Container Scanning (push) Failing after 0s
Security Scanning / Dependency Scanning (Safety + Trivy) (push) Failing after 2s
Security Scanning / Secret Scanning (push) Failing after 0s
Test Matrix / Lint (push) Failing after 1s
Security Scanning / License Compliance (push) Failing after 3s
Test Matrix / Test (${{ matrix.python-version }}, ${{ matrix.test-type }}) (macos-latest, 3.11, unit) (push) Has been skipped
Test Matrix / Test (${{ matrix.python-version }}, ${{ matrix.test-type }}) (ubuntu-latest, 3.10, integration) (push) Has been skipped
Test Matrix / Test (${{ matrix.python-version }}, ${{ matrix.test-type }}) (ubuntu-latest, 3.10, unit) (push) Has been skipped
Test Matrix / Test (${{ matrix.python-version }}, ${{ matrix.test-type }}) (ubuntu-latest, 3.11, integration) (push) Has been skipped
Test Matrix / Test (${{ matrix.python-version }}, ${{ matrix.test-type }}) (ubuntu-latest, 3.11, unit) (push) Has been skipped
Test Matrix / Test (${{ matrix.python-version }}, ${{ matrix.test-type }}) (ubuntu-latest, 3.12, integration) (push) Has been skipped
Test Matrix / Test (${{ matrix.python-version }}, ${{ matrix.test-type }}) (ubuntu-latest, 3.12, unit) (push) Has been skipped
Test Matrix / E2E Tests (push) Has been skipped
Test Matrix / Coverage Summary (push) Has been skipped
Test Matrix / Security Scan (push) Failing after 3s
Security Scanning / Security Summary (push) Failing after 2s
TODO to Issue / Create Issues from TODOs (push) Failing after 0s
Test Matrix / Build Docker Image (push) Has been skipped
Test Matrix / All Tests Passed (push) Failing after 0s
test(issue-#37): add comprehensive risk assessment API tests (WIP)
Created 700+ lines of test coverage for risk assessment endpoints:
- 25 test cases covering all CRUD operations
- Access control tests (guardian, psychologist, administrator)
- Ollama integration mocking
- Fallback mechanisms
- Pagination and filtering
- Error handling

Current status: 4/25 tests passing (16%)

Changes:
- Create tests/unit/test_api_risk_assessments.py with 25 test cases
- Update test helpers for PostgreSQL model compatibility
- Fix mock patches for Ollama client
- Update create_access_token call signature
- Fix model field names (user_id, oss_file_key, text_content, risk_keywords)

Remaining issues to fix:
1. Async/sync mismatch: ChunkedIteratorResult can't be awaited
2. Check constraint violations: sentiment values need validation
3. Need to align test database with async API code

Dependencies fixed:
- Downgrade bcrypt 5.0.0 → 4.3.0 for passlib compatibility
- Install asyncpg for PostgreSQL async driver
- Install psycopg2-binary for PostgreSQL sync tests

Related to Issue #37

🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
2026-01-01 14:56:41 +08:00
..