-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix(taskworker): Pass simple types to prepare_organization_report task in tests #90768
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -634,7 +634,7 @@ def test_message_builder_multiple_users_prevent_resend(self, message_builder, re | |
|
||
# TODO(RyanSkonnord): Make sure this doesn't cause false negatives after | ||
# batch IDs are also used to prevent duplicate sends | ||
batch_id = UUID("ea18c80c-d44f-48a4-8973-b0daa3169c44") | ||
batch_id = str(UUID("ea18c80c-d44f-48a4-8973-b0daa3169c44")) | ||
|
||
with ( | ||
mock.patch( | ||
|
@@ -887,6 +887,7 @@ def test_group_status_to_color_obj_correct_length(self): | |
@mock.patch("sentry.tasks.summaries.weekly_reports.MessageBuilder") | ||
def test_email_override_simple(self, message_builder, record): | ||
user = self.create_user(email="[email protected]") | ||
user_id = user.id | ||
self.create_member(teams=[self.team], user=user, organization=self.organization) | ||
extra_team = self.create_team(organization=self.organization) | ||
# create an extra project to ensure our email only gets the user's project | ||
|
@@ -902,7 +903,7 @@ def test_email_override_simple(self, message_builder, record): | |
self.organization.id, | ||
self._dummy_batch_id, | ||
dry_run=False, | ||
target_user=user, | ||
target_user=user_id, | ||
email_override="[email protected]", | ||
) | ||
|
||
|
@@ -932,7 +933,7 @@ def test_user_with_team_and_no_projects(self, message_builder, record): | |
project = self.create_project(organization=organization) | ||
|
||
user = self.create_user(email="[email protected]") | ||
|
||
user_id = user.id | ||
extra_team = self.create_team(organization=organization, members=[]) | ||
self.create_member(teams=[extra_team], user=user, organization=organization) | ||
|
||
|
@@ -944,7 +945,7 @@ def test_user_with_team_and_no_projects(self, message_builder, record): | |
organization.id, | ||
self._dummy_batch_id, | ||
dry_run=False, | ||
target_user=user, | ||
target_user=user_id, | ||
) | ||
|
||
for call_args in message_builder.call_args_list: | ||
|
@@ -1001,7 +1002,7 @@ def test_email_override_invalid_target_user(self, logger): | |
# fill with data so report not skipped | ||
self.store_event_outcomes(org.id, proj.id, self.two_days_ago, num_times=2) | ||
|
||
batch_id = UUID("ef61f1d1-41a3-4530-8160-615466937076") | ||
batch_id = str(UUID("ef61f1d1-41a3-4530-8160-615466937076")) | ||
enochtangg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
prepare_organization_report( | ||
self.timestamp, | ||
ONE_DAY * 7, | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.