Skip to content

Commit

Permalink
Update tests to account for media items being deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb committed Jun 24, 2024
1 parent c9a1fdf commit 8cea252
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,13 @@ def test_create_moderation_decision_for_reports(
assert f"Created 1 {media_type} moderation decisions from existing reports." in out

decision = MediaDecision.objects.first()
assert decision.media_objs.count() == 1
assert decision.action == expected_action
assert decision.moderator.username == username

assert MediaDecisionThrough.objects.filter(decision=decision).count() == 1

decision_through = MediaDecisionThrough.objects.first()
assert decision_through.media_obj == report.media_obj
assert str(decision_through.media_obj_id) == report.media_obj_id
assert decision_through.decision == decision


Expand Down

0 comments on commit 8cea252

Please sign in to comment.