Fix tests after moving static files
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
5e2add90a8
commit
2ad538f5cc
|
@ -674,7 +674,7 @@ class TestPayment(TestCase):
|
||||||
response = self.client.post(reverse('registration:update_payment', args=(payment.pk,)),
|
response = self.client.post(reverse('registration:update_payment', args=(payment.pk,)),
|
||||||
data={'type': "bank_transfer",
|
data={'type': "bank_transfer",
|
||||||
'additional_information': "This is a 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)
|
self.assertRedirects(response, reverse('participation:team_detail', args=(self.team.pk,)), 302, 200)
|
||||||
payment.refresh_from_db()
|
payment.refresh_from_db()
|
||||||
self.assertIsNone(payment.valid)
|
self.assertIsNone(payment.valid)
|
||||||
|
@ -735,7 +735,7 @@ class TestPayment(TestCase):
|
||||||
response = self.client.post(reverse('registration:update_payment', args=(payment.pk,)),
|
response = self.client.post(reverse('registration:update_payment', args=(payment.pk,)),
|
||||||
data={'type': "scholarship",
|
data={'type': "scholarship",
|
||||||
'additional_information': "I don't have to pay because I have a 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)
|
self.assertRedirects(response, reverse('participation:team_detail', args=(self.team.pk,)), 302, 200)
|
||||||
payment.refresh_from_db()
|
payment.refresh_from_db()
|
||||||
self.assertIsNone(payment.valid)
|
self.assertIsNone(payment.valid)
|
||||||
|
|
|
@ -333,7 +333,7 @@ class TestRegistration(TestCase):
|
||||||
|
|
||||||
response = self.client.post(reverse(f"registration:upload_user_{auth_type}",
|
response = self.client.post(reverse(f"registration:upload_user_{auth_type}",
|
||||||
args=(self.student.registration.pk,)), data={
|
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)
|
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
|
old_authoratization = self.student.registration.photo_authorization.path
|
||||||
response = self.client.post(reverse("registration:upload_user_photo_authorization",
|
response = self.client.post(reverse("registration:upload_user_photo_authorization",
|
||||||
args=(self.student.registration.pk,)), data=dict(
|
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.assertRedirects(response, reverse("registration:user_detail", args=(self.student.pk,)), 302, 200)
|
||||||
self.assertFalse(os.path.isfile(old_authoratization))
|
self.assertFalse(os.path.isfile(old_authoratization))
|
||||||
|
|
Loading…
Reference in New Issue