______________ TestGuardPaths.test_paused_campaign_short_circuits ______________

self = <tests.test_send_one_task.TestGuardPaths object at 0x7fa224b03a90>
db_engine = Engine(postgresql+psycopg://mailer:***@localhost:5432/bulkmailer_test_0d5181d4)
send_mod = (<module 'app.tasks.send_tasks' from '/workspace/bulkmailer/app/tasks/send_tasks.py'>, <tests.test_send_one_task._Recorder object at 0x7fa222148dd0>)

    def test_paused_campaign_short_circuits(self, db_engine, send_mod):
        from sqlalchemy.orm import Session
        from app.models import Campaign
        st, _ = send_mod
        with Session(db_engine, expire_on_commit=False) as db:
            f = _seed_sendable(db)
            f["campaign"].status = "paused"
            db.commit()
            cid, crid = f["campaign"].id, f["cr"].id
        out = _call(st, cid, crid)
        assert out["ok"] is False and out["status"] == "cancelled"
>       assert "paused" in out["reason"]
E       AssertionError: assert 'paused' in 'campaign deleted'

tests/test_send_one_task.py:244: AssertionError
__________ TestGuardPaths.test_already_finalized_recipient_no_resend ___________

self = <tests.test_send_one_task.TestGuardPaths object at 0x7fa224b03e50>
db_engine = Engine(postgresql+psycopg://mailer:***@localhost:5432/bulkmailer_test_0d5181d4)
send_mod = (<module 'app.tasks.send_tasks' from '/workspace/bulkmailer/app/tasks/send_tasks.py'>, <tests.test_send_one_task._Recorder object at 0x7fa2221c7090>)

    def test_already_finalized_recipient_no_resend(self, db_engine, send_mod):
        from sqlalchemy.orm import Session
        from app.models import CampaignRecipient
        st, _ = send_mod
        with Session(db_engine, expire_on_commit=False) as db:
            f = _seed_sendable(db)
            f["cr"].status = "sent"
            db.commit()
            cid, crid = f["campaign"].id, f["cr"].id
        out = _call(st, cid, crid)
>       assert out == {"ok": True, "status": "sent", "reason": "already finalized"}
E       AssertionError: assert {'ok': False,...: 'cancelled'} == {'ok': True, ...atus': 'sent'}
E         
E         Differing items:
