Skip to content

Commit

Permalink
test update
Browse files Browse the repository at this point in the history
  • Loading branch information
eviljeff committed Jan 9, 2025
1 parent 8486ff4 commit 56dc317
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/olympia/abuse/tests/test_cinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1256,19 +1256,21 @@ def test_appeal_specific_version_from_report(self):

def test_appeal_specific_version_from_action(self):
"""For an appeal from a developer, version_string will be None on the
CinderClass instance. If version_string is falsely we collect and flag the addon
CinderClass instance. If version_string is falsey we collect and flag the addon
versions from the appealled decision rather the current_version."""
addon = self._create_dummy_target()
other_version = version_factory(
flagged_version = version_factory(
addon=addon,
channel=amo.CHANNEL_UNLISTED,
file_kw={'status': amo.STATUS_AWAITING_REVIEW},
)
decision = ContentDecision.objects.create(
action=DECISION_ACTIONS.AMO_DISABLE_ADDON, cinder_id='some_id', addon=addon
)
# An activity log links the flagged_version to the decision, even though the
# version_string on the CinderClass below is set to None
ActivityLog.objects.create(
amo.LOG.FORCE_DISABLE, addon, other_version, decision, user=user_factory()
amo.LOG.FORCE_DISABLE, addon, flagged_version, decision, user=user_factory()
)
self._test_appeal(
CinderUser(user_factory()),
Expand All @@ -1277,11 +1279,11 @@ def test_appeal_specific_version_from_action(self):
)
assert not addon.current_version.needshumanreview_set.exists()
assert (
other_version.needshumanreview_set.get().reason
flagged_version.needshumanreview_set.get().reason
== NeedsHumanReview.REASONS.ADDON_REVIEW_APPEAL
)
assert not addon.current_version.reload().due_date
assert other_version.reload().due_date
assert flagged_version.reload().due_date

def test_appeal_no_current_version(self):
addon = self._create_dummy_target(
Expand Down

0 comments on commit 56dc317

Please sign in to comment.