Closed molinto closed 2 years ago
I don't understand. This project always had a tests.py and still does. https://github.com/miguelgrinberg/microblog/blob/main/tests.py
Sorry for confusion I'm using the repo: https://github.com/miguelgrinberg/microblog-api
@molinto Maybe you don't realize this, but you are mixing up completely different projects and that is the reason why things don't seem to match up.
To run the tests for the Microblog API project (which has absolutely nothing to do with the Flask Mega-Tutorial) install tox
and then run tox -e py310
, replacing py310
with the version of Python you are using (i.e. py39
, py38
, etc.).
Hi, big thanks to Miguel for this awesome repo & blog post (https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xv-a-better-application-structure)
I've cloned your repo, made a new model & added a new route, I would now like to write tests from them. I'm trying to run the existing tests in the tests folder, but think I'm doing something wrong. In the blog post it mentions tests.py but this file does not exist any longer, tad confused.
How do you actually run the tests please? Is there a Flash command to run, eg: Flask run tests?
Thank you Sharry
Hi, please check out these answers from SO. I bet it's what you're looking for.
Hi, big thanks to Miguel for this awesome repo & blog post (https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xv-a-better-application-structure)
I've cloned your repo, made a new model & added a new route, I would now like to write tests from them. I'm trying to run the existing tests in the tests folder, but think I'm doing something wrong. In the blog post it mentions tests.py but this file does not exist any longer, tad confused.
How do you actually run the tests please? Is there a Flash command to run, eg: Flask run tests?
Thank you Sharry