From the course: Flask Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Testing your Flask app

Testing your Flask app

From the course: Flask Essential Training

Start my 1-month free trial

Testing your Flask app

- [Instructor] Now that we have a project that we want to deploy so that everyone can enjoy, it's a good idea to get some testing in place. Testing allows us to make sure that whenever we make changes to our project, that we can be confident that the code that we've written is unaffected and will still work for our users. So in order to do some testing, let's go ahead and move over to our terminal, hit Control + C to stop our server and we're going to install a tool to help us test our project. And we're going to do a pipenv install and we want to install pytest. Now, there's lots of great documentation with pytest about how to make all sorts of different tests for your data. I'm going to show you a couple of simple steps here. So let's go ahead and move back into our project and the first thing that we need to do is create a file. Now, the name of this file is important so let's go ahead and in the top level…

Contents