diff --git a/api/test/unit/management/commands/test_backfillmoderationdecision.py b/api/test/unit/management/commands/test_backfillmoderationdecision.py index 9c6e517dd91..4c4e91cc88d 100644 --- a/api/test/unit/management/commands/test_backfillmoderationdecision.py +++ b/api/test/unit/management/commands/test_backfillmoderationdecision.py @@ -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