From 2ad538f5ccde137e5a7b282f2176c9fa55074d4c Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Fri, 7 Jun 2024 14:25:37 +0200 Subject: [PATCH] Fix tests after moving static files Signed-off-by: Emmy D'Anello --- participation/tests.py | 4 ++-- registration/tests.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/participation/tests.py b/participation/tests.py index 3b47aca..92310a4 100644 --- a/participation/tests.py +++ b/participation/tests.py @@ -674,7 +674,7 @@ class TestPayment(TestCase): response = self.client.post(reverse('registration:update_payment', args=(payment.pk,)), data={'type': "bank_transfer", 'additional_information': "This is a bank transfer", - 'receipt': open("tfjm/static/Fiche_sanitaire.pdf", "rb")}) + 'receipt': open("tfjm/static/tfjm/Fiche_sanitaire.pdf", "rb")}) self.assertRedirects(response, reverse('participation:team_detail', args=(self.team.pk,)), 302, 200) payment.refresh_from_db() self.assertIsNone(payment.valid) @@ -735,7 +735,7 @@ class TestPayment(TestCase): response = self.client.post(reverse('registration:update_payment', args=(payment.pk,)), data={'type': "scholarship", 'additional_information': "I don't have to pay because I have a scholarship", - 'receipt': open("tfjm/static/Fiche_sanitaire.pdf", "rb")}) + 'receipt': open("tfjm/static/tfjm/Fiche_sanitaire.pdf", "rb")}) self.assertRedirects(response, reverse('participation:team_detail', args=(self.team.pk,)), 302, 200) payment.refresh_from_db() self.assertIsNone(payment.valid) diff --git a/registration/tests.py b/registration/tests.py index d030f31..50b22a0 100644 --- a/registration/tests.py +++ b/registration/tests.py @@ -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))