test(regulatory-info-package): 覆盖材料包主链路
This commit is contained in:
17
tests/test_regulatory_info_package_notification.py
Normal file
17
tests/test_regulatory_info_package_notification.py
Normal 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
|
||||
Reference in New Issue
Block a user