Skip to content

Commit

Permalink
Nettoyage des tests des vues des galeries
Browse files Browse the repository at this point in the history
  • Loading branch information
Situphen committed Nov 17, 2021
1 parent 842fc4c commit d7c7dab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions zds/gallery/tests/tests_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ def test_fail_member_no_permission_can_edit_image(self):

self.client.post(
reverse("gallery-image-edit", args=[self.gallery.pk, self.image.pk]),
{"title": "modify with no perms", "legend": "test legend", "slug": "test-slug", "physical": fp},
{"title": "modify with no perms", "legend": "test legend", "physical": fp},
follow=True,
)

Expand All @@ -535,7 +535,7 @@ def test_success_member_edit_image(self):
with open(filename, "rb") as fp:
response = self.client.post(
reverse("gallery-image-edit", args=[self.gallery.pk, self.image.pk]),
{"title": "edit title", "legend": "dit legend", "slug": "edit-slug", "physical": fp},
{"title": "edit title", "legend": "dit legend", "physical": fp},
follow=True,
)
self.assertEqual(200, response.status_code)
Expand Down Expand Up @@ -666,7 +666,7 @@ def test_success_new_image_write_permission(self):
with open(filename, "rb") as fp:
response = self.client.post(
reverse("gallery-image-new", args=[self.gallery.pk]),
{"title": "Test title", "legend": "Test legend", "slug": "test-slug", "physical": fp},
{"title": "Test title", "legend": "Test legend", "physical": fp},
follow=True,
)

Expand All @@ -682,7 +682,7 @@ def test_fail_new_image_with_read_permission(self):
with (settings.BASE_DIR / "fixtures" / "logo.png").open("rb") as fp:
response = self.client.post(
reverse("gallery-image-new", args=[self.gallery.pk]),
{"title": "Test title", "legend": "Test legend", "slug": "test-slug", "physical": fp},
{"title": "Test title", "legend": "Test legend", "physical": fp},
follow=True,
)

Expand All @@ -696,7 +696,7 @@ def test_fail_new_image_with_no_permission(self):
with (settings.BASE_DIR / "fixtures" / "logo.png").open("rb") as fp:
response = self.client.post(
reverse("gallery-image-new", args=[self.gallery.pk]),
{"title": "Test title", "legend": "Test legend", "slug": "test-slug", "physical": fp},
{"title": "Test title", "legend": "Test legend", "physical": fp},
follow=True,
)

Expand All @@ -709,7 +709,7 @@ def test_fail_gallery_not_exist(self):
with (settings.BASE_DIR / "fixtures" / "logo.png").open("rb") as fp:
response = self.client.post(
reverse("gallery-image-new", args=[156]),
{"title": "Test title", "legend": "Test legend", "slug": "test-slug", "physical": fp},
{"title": "Test title", "legend": "Test legend", "physical": fp},
follow=True,
)

Expand Down

0 comments on commit d7c7dab

Please sign in to comment.