-
Notifications
You must be signed in to change notification settings - Fork 614
Ensure RedisIntegration is disabled, unless redis is installed
#2504
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
Changes from 7 commits
069b6e9
b039d84
0f307bb
b3a81a1
f9ea0cf
76841a1
d9bd1fd
ad47ea3
b3dc172
1a63d0d
dc86efe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| from sentry_sdk.integrations import Integration, setup_integrations | ||
|
|
||
|
|
||
| class NoOpIntegration(Integration): | ||
| """ | ||
| A simple no-op integration for testing purposes. | ||
| """ | ||
|
|
||
| identifier = "noop" | ||
|
|
||
| def setup_once(): # type: () -> None | ||
| pass | ||
|
|
||
| def __eq__(self, __value: object) -> bool: | ||
| """ | ||
| All instances of NoOpIntegration should be considered equal to each other. | ||
| """ | ||
| return type(__value) == type(self) | ||
|
|
||
|
|
||
| def test_multiple_setup_integrations_calls(): | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sentrivana Do you think this new file is an appropriate place for this test?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not just put it in Or maybe we could rename this new file from
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I'll put it in |
||
| first_call_return = setup_integrations([NoOpIntegration()], with_defaults=False) | ||
| assert first_call_return == {NoOpIntegration.identifier: NoOpIntegration()} | ||
|
|
||
| second_call_return = setup_integrations([NoOpIntegration()], with_defaults=False) | ||
| assert second_call_return == {NoOpIntegration.identifier: NoOpIntegration()} | ||
Uh oh!
There was an error while loading. Please reload this page.