mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-06-18 07:19:35 +00:00
Complete Tier-1 closure follow-through by wiring docs governance gates, RC release readiness checks, source-of-truth enforcement, executive weekly contract surface, and go-live severity notes. Add full go-live revenue execution documentation set (production activation, real production playbook, trust expansion, first 3 clients, live deployment, and automated revenue engine) and register all canonical paths. Made-with: Cursor
46 lines
1.4 KiB
Python
46 lines
1.4 KiB
Python
"""WS7: Saudi-sensitive proposal send — PDPL + OWASP fields when external contacts."""
|
|
|
|
import pytest
|
|
from pydantic import ValidationError
|
|
|
|
from app.api.v1.proposals import SendRequest
|
|
|
|
|
|
def test_send_request_allows_without_external_contacts():
|
|
s = SendRequest(channel="email", recipient="x@example.com")
|
|
assert s.external_company_contacts is False
|
|
|
|
|
|
def test_send_request_rejects_external_contacts_without_pdpl():
|
|
with pytest.raises(ValidationError, match="pdpl_processing_class"):
|
|
SendRequest(
|
|
channel="email",
|
|
recipient="x@example.com",
|
|
external_company_contacts=True,
|
|
pdpl_processing_class=None,
|
|
owasp_surface_ref="LLM01",
|
|
)
|
|
|
|
|
|
def test_send_request_rejects_external_contacts_without_owasp():
|
|
with pytest.raises(ValidationError, match="owasp_surface_ref"):
|
|
SendRequest(
|
|
channel="email",
|
|
recipient="x@example.com",
|
|
external_company_contacts=True,
|
|
pdpl_processing_class="personal",
|
|
owasp_surface_ref=None,
|
|
)
|
|
|
|
|
|
def test_send_request_accepts_gated_fields():
|
|
s = SendRequest(
|
|
channel="email",
|
|
recipient="x@example.com",
|
|
external_company_contacts=True,
|
|
pdpl_processing_class="sensitive",
|
|
owasp_surface_ref="LLM01_prompt_injection",
|
|
ecc_control_owner="security@example.com",
|
|
)
|
|
assert s.pdpl_processing_class == "sensitive"
|