>       assert r.status_code in (200, 201), r.text
E       AssertionError: {"detail":"HTML rejected: Unsubstituted variables remain: ['FirstName', 'RandomInvoiceNumber']"}
E       assert 400 in (200, 201)
E        +  where 400 = <Response [400 Bad Request]>.status_code

tests/test_api_attachments_phones_suppression_settings_logs.py:78: AssertionError
__________________ TestLogsApi.test_recipient_history_seeded ___________________

self = <tests.test_api_attachments_phones_suppression_settings_logs.TestLogsApi object at 0x7f0aab591b10>
api = <starlette.testclient.TestClient object at 0x7f0aa426aad0>
db = <sqlalchemy.orm.session.Session object at 0x7f0aa43aedd0>

    def test_recipient_history_seeded(self, api, db):
        ids = self._seed(db, user_id_of(api))
        r = api.get(f"/logs/recipient/{ids['cr1']}/history")
        assert r.status_code == 200
        d = r.json()
>       assert "email" in d
E       AssertionError: assert 'email' in {'attempts': [{'account_id': None, 'attempt_number': 1, 'campaign_id': 1, 'campaign_recipient_id': 1, ...}], 'events':...pe': 'sent', 'id': 1, ...}], 'recipient': {'amount': None, 'email': 'logsa@x.com', 'id': 1, 'invoice_number': '', ...}}

tests/test_api_attachments_phones_suppression_settings_logs.py:605: AssertionError
=============================== warnings summary ===============================
tests/test_api_attachments_phones_suppression_settings_logs.py::TestAttachmentsApi::test_html_upload_stored_inline
  /usr/local/lib/python3.11/site-packages/bs4/builder/_lxml.py:124: DeprecationWarning: The 'strip_cdata' option of HTMLParser() has never done anything and will eventually be removed.
    parser = parser(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_api_attachments_phones_suppression_settings_logs.py::TestAttachmentsApi::test_html_upload_stored_inline
FAILED tests/test_api_attachments_phones_suppression_settings_logs.py::TestLogsApi::test_recipient_history_seeded
2 failed, 1 warning in 3.03s
