/usr/local/lib/python3.11/site-packages/pytest_asyncio/plugin.py:207: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
============================= test session starts ==============================
platform linux -- Python 3.11.15, pytest-8.3.4, pluggy-1.6.0
rootdir: /workspace/bulkmailer
plugins: anyio-4.14.0, asyncio-0.25.0
asyncio: mode=Mode.STRICT, asyncio_default_fixture_loop_scope=None
collected 61 items / 52 deselected / 9 selected

tests/test_api_accounts_campaigns_testsend_unsubscribe.py .F..F....      [100%]

=================================== FAILURES ===================================
_________ TestBulkSmtpAccountsApi.test_bulk_add_never_echoes_password __________

self = <tests.test_api_accounts_campaigns_testsend_unsubscribe.TestBulkSmtpAccountsApi object at 0x7fc03b161c50>
api = <starlette.testclient.TestClient object at 0x7fc03654bdd0>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fc03659e250>

    def test_bulk_add_never_echoes_password(self, api, monkeypatch):
        self._mock_verify_ok(monkeypatch)
        r = api.post("/gmail/accounts/bulk-smtp", headers=H(api),
                     json={"lines": "secret@gmail.com:abcd efgh ijkl mnop"})
>       assert "abcdefghijklmnop" not in r.text.lower().replace(" ", "")
E       assert 'abcdefghijklmnop' not in '{"ok":true,...mtplogin"}]}'
E         
E         'abcdefghijklmnop' is contained here:
E           gmail.com:abcdefghijklmnop","email":"secret@gmail.com","ok":true,"detail":"verifiedviarealsmtplogin"}]}
E         ?           ++++++++++++++++

tests/test_api_accounts_campaigns_testsend_unsubscribe.py:299: AssertionError
___ TestBulkSmtpAccountsApi.test_bulk_add_updates_existing_account_in_place ____

self = <tests.test_api_accounts_campaigns_testsend_unsubscribe.TestBulkSmtpAccountsApi object at 0x7fc03b162990>
api = <starlette.testclient.TestClient object at 0x7fc036580c90>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fc0365ecbd0>
db = <sqlalchemy.orm.session.Session object at 0x7fc0365ede50>

    def test_bulk_add_updates_existing_account_in_place(self, api, monkeypatch, db):
        self._mock_verify_ok(monkeypatch)
        r1 = api.post("/gmail/accounts/bulk-smtp", headers=H(api),
                      json={"lines": "dup@gmail.com:abcd efgh ijkl mnop",
                            "daily_limit": 10, "campaign_limit": 5})
        assert r1.json()["succeeded"] == 1
        r2 = api.post("/gmail/accounts/bulk-smtp", headers=H(api),
                      json={"lines": "dup@gmail.com:newp assw ordh ere1",
                            "daily_limit": 77, "campaign_limit": 33})
>       assert r2.json()["succeeded"] == 1
E       assert 0 == 1

tests/test_api_accounts_campaigns_testsend_unsubscribe.py:329: AssertionError
=========================== short test summary info ============================
FAILED tests/test_api_accounts_campaigns_testsend_unsubscribe.py::TestBulkSmtpAccountsApi::test_bulk_add_never_echoes_password
FAILED tests/test_api_accounts_campaigns_testsend_unsubscribe.py::TestBulkSmtpAccountsApi::test_bulk_add_updates_existing_account_in_place
================== 2 failed, 7 passed, 52 deselected in 8.73s ==================
