from datetime import datetime, timezone from kab_ingestion.models import ACL, NormalizedDocument def test_document_requires_tenant_and_acl(): d = NormalizedDocument(document_id='x', tenant_id='t', title='a', body='b', mime_type='text/plain', source_path='a', content_hash='h', updated_at=datetime.now(timezone.utc), acl=ACL(), provenance={'connector':'x','source_uri':'u','source_id':'s','retrieved_at':datetime.now(timezone.utc)}) assert d.tenant_id == 't' and not d.acl.public