From 0a2f2f020c1e42c35681782acca31bb3880e419c Mon Sep 17 00:00:00 2001 From: Arnaud-D <35631001+Arnaud-D@users.noreply.github.com> Date: Thu, 7 Mar 2024 20:34:49 +0100 Subject: [PATCH] Corrige un test (4) --- .../tests/tests_views/tests_content.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/zds/tutorialv2/tests/tests_views/tests_content.py b/zds/tutorialv2/tests/tests_views/tests_content.py index ccc666e030..3277cc0459 100644 --- a/zds/tutorialv2/tests/tests_views/tests_content.py +++ b/zds/tutorialv2/tests/tests_views/tests_content.py @@ -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)