1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 05:58:25 +02:00

Fix tests after moving static files

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2024-06-07 14:25:37 +02:00
parent 5e2add90a8
commit 2ad538f5cc
2 changed files with 4 additions and 4 deletions

View File

@ -333,7 +333,7 @@ class TestRegistration(TestCase):
response = self.client.post(reverse(f"registration:upload_user_{auth_type}",
args=(self.student.registration.pk,)), data={
auth_type: open("tfjm/static/Fiche_sanitaire.pdf", "rb"),
auth_type: open("tfjm/static/tfjm/Fiche_sanitaire.pdf", "rb"),
})
self.assertRedirects(response, reverse("registration:user_detail", args=(self.student.pk,)), 302, 200)
@ -356,7 +356,7 @@ class TestRegistration(TestCase):
old_authoratization = self.student.registration.photo_authorization.path
response = self.client.post(reverse("registration:upload_user_photo_authorization",
args=(self.student.registration.pk,)), data=dict(
photo_authorization=open("tfjm/static/Fiche_sanitaire.pdf", "rb"),
photo_authorization=open("tfjm/static/tfjm/Fiche_sanitaire.pdf", "rb"),
))
self.assertRedirects(response, reverse("registration:user_detail", args=(self.student.pk,)), 302, 200)
self.assertFalse(os.path.isfile(old_authoratization))