I am attempting to add unit tests to a Flask project I inherited from a former co-worker, but I keep having issues getting the Flask test_client to work correctly. Mainly, when I trace through using a debugger, not all of the methods decorated with @before_request are getting run. So, for example, I have a flask app with 2 methods decorated with @before_request, but only one of those methods are getting executed. I can tell this because I have set breakpoints and put print statements in both methods, but only one is showing output or breaking on the breakpoint. Could any help me figure out why this might be?
Aucun commentaire:
Enregistrer un commentaire