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
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
2 changed files with 4 additions and 4 deletions

View File

@ -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)

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))