Conversation
tests/www/apply/test_process.py
Outdated
| job_application.resume_link = "" | ||
| job_application.save(update_fields=["resume_link"]) | ||
| with freeze_time("2023-12-12 13:37:00") as initial_invite_time: | ||
| job_application = JobApplicationFactory( |
There was a problem hiding this comment.
à cause de l'opération sur la session dans la vue details_for_company si on saute à une date trop éloignée, l'utilisateur est automatiquement déconnecté.
J'ai donc passé tout le test à une date fixe (en avançant un peu dans le temps à chaque post/get)
There was a problem hiding this comment.
Tu peux transformer le context manager en décorateur pour mieux l’indiquer et gagner un niveau d’indentation.
There was a problem hiding this comment.
L’explication du changement de ce test serait très utile en message de commit.
d191e31 to
0a3d5f4
Compare
|
🥁 La recette jetable est prête ! 👉 Je veux tester cette PR ! |
75fddb9 to
aed2d4a
Compare
This comment was marked as resolved.
This comment was marked as resolved.
tests/www/apply/test_process.py
Outdated
| job_application.resume_link = "" | ||
| job_application.save(update_fields=["resume_link"]) | ||
| with freeze_time("2023-12-12 13:37:00") as initial_invite_time: | ||
| job_application = JobApplicationFactory( |
There was a problem hiding this comment.
Tu peux transformer le context manager en décorateur pour mieux l’indiquer et gagner un niveau d’indentation.
tests/www/apply/test_process.py
Outdated
| job_application.resume_link = "" | ||
| job_application.save(update_fields=["resume_link"]) | ||
| with freeze_time("2023-12-12 13:37:00") as initial_invite_time: | ||
| job_application = JobApplicationFactory( |
There was a problem hiding this comment.
L’explication du changement de ce test serait très utile en message de commit.
aed2d4a to
7f80dc6
Compare
Because of the session used in the view details_for_company, if the time skips too much in a test, the session is revoked and the user is logged out. That's why I changed the whole test_diagoriente_invite_as_employee_for_authorized_prescriber test to use a freeze_time decorator with a tick to move forward during the test
7f80dc6 to
ae2e70a
Compare
🤔 Pourquoi ?
🍰 Comment ?
🚨 À vérifier
🏝️ Comment tester
💻 Captures d'écran