test(regulatory-info-package): 覆盖材料包主链路

This commit is contained in:
2026-06-10 19:50:22 +08:00
parent dcd829e821
commit 6d4b519f83
16 changed files with 667 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import pytest
from review_agent.models import Conversation, RegulatoryInfoPackageBatch, RegulatoryInfoPackageNotificationRecord
pytestmark = pytest.mark.django_db
def test_regulatory_info_package_notification_record_defaults(django_user_model):
user = django_user_model.objects.create_user(username="owner", password="pass")
conversation = Conversation.objects.create(user=user, title="会话")
batch = RegulatoryInfoPackageBatch.objects.create(conversation=conversation, user=user, batch_no="RIP-NOTIFY")
record = RegulatoryInfoPackageNotificationRecord.objects.create(batch=batch, recipient=user)
assert record.channel == RegulatoryInfoPackageNotificationRecord.Channel.MOCK
assert record.send_status == RegulatoryInfoPackageNotificationRecord.SendStatus.PENDING