mock server, file and folder management
This commit is contained in:
@@ -25,6 +25,7 @@ from app.mailer.campaign.loader import load_campaign_config
|
||||
from app.mailer.campaign.validation import Severity, validate_campaign_config
|
||||
from app.mailer.messages.builder import build_campaign_messages
|
||||
from app.mailer.messages.models import MessageDraft
|
||||
from app.storage.services import record_campaign_attachment_uses_for_job
|
||||
|
||||
RUNTIME_DIR = Path(__file__).resolve().parents[3] / "runtime"
|
||||
CAMPAIGN_SNAPSHOT_DIR = RUNTIME_DIR / "campaign_snapshots"
|
||||
@@ -326,6 +327,7 @@ def build_campaign_version(
|
||||
)
|
||||
session.add(job)
|
||||
session.flush()
|
||||
record_campaign_attachment_uses_for_job(session, job, stage="built")
|
||||
for issue in built.draft.issues:
|
||||
session.add(
|
||||
CampaignIssue(
|
||||
|
||||
@@ -100,6 +100,7 @@ def minimal_campaign_json(*, external_id: str, name: str, description: str | Non
|
||||
"name": "Campaign files",
|
||||
"path": ".",
|
||||
"allow_individual": True,
|
||||
"unsent_warning": False,
|
||||
}
|
||||
],
|
||||
"allow_individual": True,
|
||||
@@ -126,6 +127,7 @@ def minimal_campaign_json(*, external_id: str, name: str, description: str | Non
|
||||
"missing_required_attachment": "ask",
|
||||
"missing_optional_attachment": "warn",
|
||||
"ambiguous_attachment_match": "ask",
|
||||
"unsent_attachment_files": "warn",
|
||||
"ignore_empty_fields": False,
|
||||
"missing_email": "block",
|
||||
"template_error": "block",
|
||||
|
||||
Reference in New Issue
Block a user