-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tags request origins in Sentry when loading request data from the body (
- Loading branch information
1 parent
e67bd56
commit 275139c
Showing
4 changed files
with
36 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from unittest.mock import Mock | ||
|
||
|
||
def mock_sentry_context_for_tagging(patched_push_scope): | ||
mock_scope = Mock() | ||
mock_set_tag = Mock() | ||
mock_scope.set_context = Mock() | ||
mock_scope.set_tag = mock_set_tag | ||
mock_context_manager = Mock() | ||
mock_context_manager.__enter__ = Mock(return_value=mock_scope) | ||
mock_context_manager.__exit__ = Mock(return_value=None) | ||
patched_push_scope.return_value = mock_context_manager | ||
return mock_set_tag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters