Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV-5281 | Fix bug with canceled_at on one-time contributions #1698

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

benjaminEwhite
Copy link
Contributor

Please fill out each section even if it's just with "N/A"

Plan? (if this draft/incomplete indicate what you intend to do and how)

What's this PR do?

Fixes a bug whereby we were logging a warning, thereby creating Sentry noise when the Contribution.canceled_at property was referenced on one-time contributions.

Why are we doing this? How does it help us?

Reduce Sentry noise.

Are there detailed, specific, step-by-step testing instructions in the associated ticket?

Yes.

Did this PR make changes to the user interface that may require changes to the user-facing docs?

No

Have automated unit tests been added? If not, why?

Yes

How should this change be communicated to end users?

N/A

Are there any smells or added technical debt to note?

No

Has this been documented? If so, where?

N/A

What are the relevant tickets? Add a link to any relevant ones.

DEV5281

Do any changes need to be made before deployment to production (adding environment variables, for example)? If so, open a ticket and link it to the ticket for this PR and list it here:

No

Are there next steps? If so, what? Have tickets been opened for them? List next-step tickets here:

N/A

@x110dc x110dc temporarily deployed to rev-engine-dev-5281-nex-rlq6lm January 15, 2025 13:08 Inactive
@@ -1651,7 +1651,8 @@ def test_canceled_at_date_when_no_subscription(self):
"canceled_at",
[None, datetime.datetime.now(datetime.timezone.utc).timestamp()],
)
def test_cancelled_at_date_when_subscription(self, canceled_at, contribution, subscription_factory, mocker):
def test_canceled_at_date_when_subscription(self, canceled_at, contribution, subscription_factory, mocker):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just changing test name so spelling of 'canceled' is consistent with spelling on method under test.

@@ -1651,7 +1651,8 @@ def test_canceled_at_date_when_no_subscription(self):
"canceled_at",
[None, datetime.datetime.now(datetime.timezone.utc).timestamp()],
)
def test_cancelled_at_date_when_subscription(self, canceled_at, contribution, subscription_factory, mocker):
def test_canceled_at_date_when_subscription(self, canceled_at, contribution, subscription_factory, mocker):
contribution.interval = ContributionInterval.MONTHLY
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We weren't ensuring this was recurring in earlier version of test, and need to do that given conditionality in method now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants