mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-02-25 05:46:30 +00:00
Compare commits
No commits in common. "de22a12e85424bc0b4ea45530d142a68c934a754" and "1e1fef7a7b3bf168d8847716672aeb3f9cec13d1" have entirely different histories.
de22a12e85
...
1e1fef7a7b
@ -7,7 +7,7 @@ py311:
|
||||
image: python:3.11-alpine
|
||||
before_script:
|
||||
- apk add --no-cache libmagic
|
||||
- apk add --no-cache gettext git # Useful for django-haystack, remove when the newer versions are in PyPI
|
||||
- apk add --no-cache git # Useful for django-haystack, remove when the newer versions are in PyPI
|
||||
- pip install tox --no-cache-dir
|
||||
script: tox -e py311
|
||||
|
||||
@ -16,7 +16,7 @@ py312:
|
||||
image: python:3.12-alpine
|
||||
before_script:
|
||||
- apk add --no-cache libmagic
|
||||
- apk add --no-cache gettext git # Useful for django-haystack, remove when the newer versions are in PyPI
|
||||
- apk add --no-cache git # Useful for django-haystack, remove when the newer versions are in PyPI
|
||||
- pip install tox --no-cache-dir
|
||||
script: tox -e py312
|
||||
|
||||
|
@ -196,12 +196,6 @@ apparaître. Vous pouvez également utiliser le lien présent dans le volet « I
|
||||
.. image:: /_static/img/payment_index.png
|
||||
:alt: Page de paiement
|
||||
|
||||
.. note::
|
||||
|
||||
Vous recevrez un mail de rappel chaque semaine. Le paiement doit être effectué avant le début du
|
||||
tournoi, sans quoi votre participation pourrait être refusée. En cas de difficultés de paiement,
|
||||
merci de nous contacter.
|
||||
|
||||
Carte bancaire
|
||||
""""""""""""""
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
from django.contrib.auth.models import User
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.contrib.sites.models import Site
|
||||
from django.core import mail
|
||||
from django.core.files.uploadedfile import SimpleUploadedFile
|
||||
from django.core.management import call_command
|
||||
from django.test import LiveServerTestCase, override_settings, TestCase
|
||||
@ -875,29 +874,6 @@ class TestPayment(TestCase):
|
||||
payment.refresh_from_db()
|
||||
self.assertFalse(payment.valid)
|
||||
|
||||
def test_payment_reminder(self):
|
||||
"""
|
||||
Check that the payment reminder command works correctly.
|
||||
"""
|
||||
self.assertEqual(len(mail.outbox), 0)
|
||||
|
||||
call_command('remind_payments')
|
||||
self.assertEqual(len(mail.outbox), 2)
|
||||
self.assertEqual(mail.outbox[0].subject, "[TFJM²] Rappel pour votre paiement")
|
||||
|
||||
payment = Payment.objects.get(registrations=self.user.registration, final=False)
|
||||
payment2 = Payment.objects.get(registrations=self.second_user.registration, final=False)
|
||||
payment.type = 'other'
|
||||
payment.valid = True
|
||||
payment.save()
|
||||
payment2.type = 'bank_transfer'
|
||||
payment2.valid = None
|
||||
payment2.save()
|
||||
|
||||
mail.outbox = []
|
||||
call_command('remind_payments')
|
||||
self.assertEqual(len(mail.outbox), 0)
|
||||
|
||||
|
||||
@override_settings(HELLOASSO_TEST_ENDPOINT=True, ROOT_URLCONF="tfjm.helloasso.test_urls")
|
||||
class TestHelloAssoPayment(LiveServerTestCase):
|
||||
@ -1100,32 +1076,6 @@ class TestHelloAssoPayment(LiveServerTestCase):
|
||||
checkout_intent = payment.get_checkout_intent()
|
||||
self.assertIn('order', checkout_intent)
|
||||
|
||||
def test_hello_asso_payment_verification(self):
|
||||
"""
|
||||
Check that a payment that is pending verification can be verified.
|
||||
"""
|
||||
with self.settings(HELLOASSO_TEST_ENDPOINT_URL=self.live_server_url):
|
||||
payment = Payment.objects.get(registrations=self.user.registration, final=False)
|
||||
self.assertFalse(payment.valid)
|
||||
|
||||
call_command('check_hello_asso')
|
||||
payment.refresh_from_db()
|
||||
self.assertFalse(payment.valid)
|
||||
|
||||
self.client.get(reverse('registration:payment_hello_asso', args=(payment.pk,)),
|
||||
follow=True)
|
||||
|
||||
payment.refresh_from_db()
|
||||
payment.valid = None
|
||||
payment.additional_information = ""
|
||||
payment.save()
|
||||
self.assertIsNone(payment.valid)
|
||||
|
||||
call_command('check_hello_asso')
|
||||
payment.refresh_from_db()
|
||||
self.assertTrue(payment.valid)
|
||||
self.assertTrue(payment.additional_information)
|
||||
|
||||
|
||||
class TestAdmin(TestCase):
|
||||
def setUp(self) -> None:
|
||||
|
21
tox.ini
21
tox.ini
@ -8,11 +8,26 @@ skipsdist = True
|
||||
|
||||
[testenv]
|
||||
sitepackages = False
|
||||
deps = coverage
|
||||
-r requirements.txt
|
||||
deps =
|
||||
coverage
|
||||
channels[daphne]~=4.0.0
|
||||
crispy-bootstrap5~=2023.10
|
||||
Django>=5.0,<6.0
|
||||
django-crispy-forms~=2.1
|
||||
django-filter~=23.5
|
||||
git+https://github.com/django-haystack/django-haystack.git#v3.3b1
|
||||
django-phonenumber-field~=7.3.0
|
||||
django-polymorphic~=3.1.0
|
||||
django-tables2~=2.7.0
|
||||
djangorestframework~=3.14.0
|
||||
django-rest-polymorphic~=0.1.10
|
||||
odfpy~=1.4.1
|
||||
phonenumbers~=8.13.27
|
||||
pypdf~=3.17.4
|
||||
python-magic~=0.4.27
|
||||
requests~=2.31.0
|
||||
|
||||
commands =
|
||||
python manage.py compilemessages -i .tox -i venv
|
||||
coverage run --source=api,draw,logs,participation,registration,tfjm ./manage.py test api/ draw/ logs/ participation/ registration/ tfjm/
|
||||
coverage report -m
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user