Answer the question
In order to leave comments, you need to log in
Flask testing?
It is necessary to test the functionality of the server written in Flask. Moved application initialization to create_app()
from flask import Flask
def create_app(debug=False):
app = Flask(__name__)
app.debug = debug
return app
Answer the question
In order to leave comments, you need to log in
There is a book by Miguel Greenberg about web development with Flask. I recommend reading the sections about testing. I deliberately will not give how, because. better than Grinberg, hardly anyone can explain it better. But. I would like to draw your attention to the fact that it is better to use py.test + pyhamcrest instead of Nose , then your tests will be more expressive and you will be able to see better "What would .. break that?"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question