Skip to content

Stop tests from sending real Pushover notifications - #657

Merged
bpepple merged 1 commit into
masterfrom
dev
Oct 17, 2026
Merged

bpepple merged 1 commit into
masterfrom
dev

Conversation

@bpepple

@bpepple bpepple commented Oct 17, 2026

Copy link
Copy Markdown
Member

Some users view tests went through signup and account activation without mocking send_pushover, so every test run sent real notifications to my phone.

Add an autouse block_pushover fixture in tests/conftest.py that patches send_pushover where it's imported (users.utils, users.views and the sync_opencollective_donors and notify_throttled_clients commands). Tests that check Pushover calls still apply their own patch, which takes precedence.

Some users view tests went through signup and account activation without mocking send_pushover, so every test run sent real notifications to my phone.

Add an autouse block_pushover fixture in tests/conftest.py that patches send_pushover where it's imported (users.utils, users.views and the sync_opencollective_donors and notify_throttled_clients commands). Tests that check Pushover calls still apply their own patch, which takes precedence.
@bpepple bpepple self-assigned this Oct 17, 2026
@bpepple bpepple added the chore Miscellaneous drudgery label Oct 17, 2026
@bpepple
bpepple merged commit 98659ec into master Oct 17, 2026
2 checks passed
@bpepple
bpepple deleted the dev branch October 17, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Miscellaneous drudgery

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant