Skip to content

Commit

Permalink
Corrige un test (3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud-D committed Mar 6, 2024
1 parent dd20c86 commit ee4df8d
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions zds/tutorialv2/tests/tests_opinion_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,9 @@ def test_publish_content_change_title_before_watchdog(self, opinions_management)
self.assertEqual(opinion.public_version.sha_public, opinion_draft.current_version)

# Change the title:
random = "Whatever, we don't care about the details"
result = self.client.post(
reverse("content:edit", args=[opinion.pk, opinion.slug]),
{
"title": "{} ({})".format(opinion.title, "modified"),
"description": random,
"introduction": random,
"conclusion": random,
"type": "OPINION",
"licence": opinion.licence.pk,
"subcategory": opinion.subcategory.first().pk,
"last_hash": opinion.load_version().compute_hash(),
"image": (settings.BASE_DIR / "fixtures" / "logo.png").open("rb"),
},
reverse("content:edit-title", args=[opinion.pk]),
{"title": f"{opinion.title} (modified)"},
follow=False,
)
self.assertEqual(result.status_code, 302)
Expand Down

0 comments on commit ee4df8d

Please sign in to comment.