Files
stack/tests/mail/test_postmark.py
kert 84ad99b98b
Some checks failed
CI / skinny-install (aco) (push) Successful in 1m10s
CI / skinny-install (api) (push) Successful in 32s
CI / skinny-install (bcda) (push) Successful in 37s
CI / skinny-install (bib) (push) Successful in 35s
CI / skinny-install (bls) (push) Successful in 27s
CI / skinny-install (ccw) (push) Successful in 27s
CI / skinny-install (cli) (push) Successful in 39s
CI / skinny-install (cms) (push) Successful in 30s
CI / skinny-install (conf) (push) Successful in 27s
CI / skinny-install (opps) (push) Successful in 31s
CI / skinny-install (perf) (push) Successful in 40s
CI / skinny-install (pfs) (push) Successful in 36s
CI / skinny-install (rex) (push) Successful in 36s
CI / lint-test (push) Failing after 10m34s
Deploy / build-scan-report (push) Failing after 5m27s
test: 19 more test files covering all remaining integration modules
Covers iom, oig, cli/{mail,prisma,zot}, mail/{cloudflare,postmark,
droplet,resend}, prisma/{vpn,screen,llm,project,export,eligibility,
extract,flow,ingest,tools}. Import + smoke tests with mocked deps.
Tracks #353.
2026-04-17 08:49:02 -04:00

25 lines
652 B
Python

"""Tests for mail.postmark — Postmark provider."""
from __future__ import annotations
from unittest.mock import patch
from mail.postmark import (
_account_headers,
)
class TestAccountHeaders:
@patch.dict("os.environ", {"POSTMARK_ACCOUNT_TOKEN": "test-token"})
def test_returns_headers(self):
h = _account_headers()
assert h["X-Postmark-Account-Token"] == "test-token"
class TestState:
def test_roundtrip(self, tmp_path):
from mail._helpers import STATE_DIR
with patch.object(type(STATE_DIR), "__fspath__", return_value=str(tmp_path)):
pass # state functions use module-level paths