Skip to content

Commit

Permalink
Corrige le test test_history_navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud-D committed Mar 7, 2024
1 parent 4b6f582 commit 7e83671
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions zds/tutorialv2/tests/tests_views/tests_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,6 @@ def test_history_navigation(self):
self.client.force_login(self.user_author)

tuto = PublishableContent.objects.get(pk=self.tuto.pk)
versioned = tuto.load_version()

# check access
result = self.client.get(reverse("content:view", args=[tuto.pk, tuto.slug]), follow=False)
Expand Down Expand Up @@ -656,21 +655,9 @@ def test_history_navigation(self):
old_slug_tuto = tuto.slug
version_1 = tuto.sha_draft # 'version 1' is the one before any change

new_licence = LicenceFactory()
random = "Pâques, c'est bientôt?"

result = self.client.post(
reverse("content:edit", args=[tuto.pk, tuto.slug]),
{
"title": random,
"description": random,
"introduction": random,
"conclusion": random,
"type": "TUTORIAL",
"licence": new_licence.pk,
"subcategory": self.subcategory.pk,
"last_hash": versioned.compute_hash(),
},
reverse("content:edit-title", args=[tuto.pk]),
{"title": "Pâques, c'est bientôt?"},
follow=False,
)
self.assertEqual(result.status_code, 302)
Expand Down

0 comments on commit 7e83671

Please sign in to comment.