16 lines
632 B
Python
16 lines
632 B
Python
from acme_app.notifier import send_reminder, send_welcome
|
|
|
|
|
|
def test_send_welcome_zwraca_identyfikator():
|
|
message_id = send_welcome("jan@example.com", api_key="k-1", endpoint="https://acme.internal")
|
|
assert message_id.startswith("msg_")
|
|
|
|
|
|
def test_send_reminder_zwraca_identyfikator():
|
|
message_id = send_reminder("jan@example.com", api_key="k-1", endpoint="https://acme.internal", body="Przypomnienie")
|
|
assert message_id.startswith("msg_")
|
|
|
|
|
|
def test_send_reminder_zwraca_none_przy_bledzie_dostawcy():
|
|
assert send_reminder("odrzuc@example.com", api_key="k-1", endpoint="https://acme.internal", body="x") is None
|