Skip to content

Commit

Permalink
Corrige 'test_import_in_existing_content'
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud-D committed Sep 17, 2024
1 parent 5d9a0f7 commit cd0eccd
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions zds/tutorialv2/tests/tests_views/tests_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,15 +1222,7 @@ def test_import_in_existing_content(self):
# create a tutorial
result = self.client.post(
reverse("content:create-content", kwargs={"created_content_type": "TUTORIAL"}),
{
"title": given_title,
"description": some_text,
"introduction": some_text,
"conclusion": some_text,
"type": "TUTORIAL",
"licence": self.licence.pk,
"subcategory": self.subcategory.pk,
},
{"title": given_title, "type": "TUTORIAL"},
follow=False,
)
self.assertEqual(result.status_code, 302)
Expand All @@ -1240,6 +1232,20 @@ def test_import_in_existing_content(self):
tuto_pk = tuto.pk
tuto_slug = tuto.slug

result = self.client.post(
reverse("content:edit-introduction", args=[tuto.pk]),
{"introduction": some_text},
follow=False,
)
self.assertEqual(result.status_code, 302)

result = self.client.post(
reverse("content:edit-conclusion", args=[tuto.pk]),
{"conclusion": some_text},
follow=False,
)
self.assertEqual(result.status_code, 302)

# add a chapter
result = self.client.post(
reverse("content:create-container", args=[tuto_pk, tuto_slug]),
Expand Down

0 comments on commit cd0eccd

Please sign in to comment.