Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ def run_cache_bumps_immediately():
yield


@pytest.fixture(autouse=True)
def block_pushover():
"""Never send real Pushover notifications from tests. Callers import
send_pushover by name, so each import site is patched; tests that assert on
it re-patch the same target, and the inner patch takes precedence."""
with (
patch("users.utils.send_pushover"),
patch("users.views.send_pushover"),
patch("users.management.commands.sync_opencollective_donors.send_pushover"),
patch("api.management.commands.notify_throttled_clients.send_pushover"),
):
yield


@pytest.fixture(autouse=True)
def isolated_login_throttle():
"""Give each test its own failed-login counters. Tests share the real Redis
Expand Down
Loading