-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tech: migration de commandes vers l'utilisation de logging #5505
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Ne touche pas aux commandes de GPS, je vais en supprimer 2 très bientôt
approval = ApprovalFactory() | ||
|
||
with assertNumQueries(1): # Select the job seekers | ||
management.call_command("populate_metabase_emplois", mode="data_inconsistencies") | ||
|
||
stdout, _ = capsys.readouterr() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
je découvre qu'on a donc 2 manière d'appeler une management command en tests en récupérant stderr :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est mieux quand je sélectionne "approve"
🤔 Pourquoi ?
Car ces commandes sont lancées par des crons et notre logging permet de facilement regrouper les logs d'une même commande.
🍰 Comment ?
🚨 À vérifier
🏝️ Comment tester ?
💻 Captures d'écran