Skip to content

Commit

Permalink
Corrige un test (4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud-D committed Mar 7, 2024
1 parent 10f76a4 commit 0a2f2f0
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions zds/tutorialv2/tests/tests_views/tests_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,24 +662,14 @@ def test_history_navigation(self):
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": random},
follow=False,
)
self.assertEqual(result.status_code, 302)

tuto = PublishableContent.objects.get(pk=self.tuto.pk)
version_2 = tuto.sha_draft # 'version 2' is the one with the different slug for the tutorial
self.assertNotEqual(tuto.slug, old_slug_tuto)
version_2 = tuto.sha_draft

# check access using old slug and no version
result = self.client.get(reverse("content:view", args=[tuto.pk, old_slug_tuto]), follow=False)
Expand Down

0 comments on commit 0a2f2f0

Please sign in to comment.