-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
ref(ACI): Refactor subscription processor tests #94675
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Enum Comparison Bug in `assert_seer_results`
The assert_seer_results
helper method incorrectly compares rule.sensitivity
and rule.seasonality
(enum objects) directly against their deserialized JSON string values. This omission of the .value
attribute, which was present in the original code, causes assertion failures.
tests/sentry/incidents/subscription_processor/test_subscription_processor_workflow_engine.py#L392-L396
sentry/tests/sentry/incidents/subscription_processor/test_subscription_processor_workflow_engine.py
Lines 392 to 396 in d2875aa
assert rule.sensitivity is not None | |
assert deserialized_body["config"]["sensitivity"] == rule.sensitivity | |
assert rule.seasonality is not None | |
assert deserialized_body["config"]["expected_seasonality"] == rule.seasonality | |
assert rule.threshold_type is not None |
Was this report helpful? Give feedback by reacting with 👍 or 👎
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Make some reusable methods to clean up the workflow engine tests, move cached properties to the subclasses that use them, and standardize the way we write docstrings.