fix: update 61 outdated test mocks to match current schemas
All checks were successful
CI/CD / go-lint (push) Has been skipped
CI/CD / python-lint (push) Has been skipped
CI/CD / nodejs-lint (push) Has been skipped
CI/CD / test-go-ai-compliance (push) Successful in 41s
CI/CD / test-python-backend-compliance (push) Successful in 31s
CI/CD / test-python-document-crawler (push) Successful in 21s
CI/CD / test-python-dsms-gateway (push) Successful in 16s
CI/CD / validate-canonical-controls (push) Successful in 10s
CI/CD / Deploy (push) Successful in 4s

Tests were failing due to stale mock objects after schema extensions:
- DSFA: add _mapping property to _DictRow, use proper mock instead of MagicMock
- Company Profile: add 6 missing fields (project_id, offering_urls, etc.)
- Legal Templates/Policy: update document type count 52→58
- VVT: add 13 missing attributes to activity mock
- Legal Documents: align consent test assertions with production behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-03-24 06:40:42 +01:00
parent 2efc738803
commit cce2707c03
7 changed files with 82 additions and 21 deletions

View File

@@ -175,8 +175,8 @@ class TestPolicyTypeValidation:
assert len(BCM_POLICIES) == 3
def test_total_valid_types_count(self):
"""VALID_DOCUMENT_TYPES has 52 entries total (16 original + 7 security + 29 policies)."""
assert len(VALID_DOCUMENT_TYPES) == 52
"""VALID_DOCUMENT_TYPES has 58 entries total (16 original + 7 security + 29 policies + 1 CRA + 1 DSFA + 4 module docs)."""
assert len(VALID_DOCUMENT_TYPES) == 58
def test_no_duplicate_policy_types(self):
"""No duplicate entries in the policy type lists."""