Closed nknaian closed 3 years ago
Miguel has made some changes to his unit testing setup since his blog post. Taking a look at his tutorial's github gives some more insight into how we may be able to set this up: https://github.com/miguelgrinberg/microblog
This ticket is to setup the testing infrastructure and write tests to cover the current user-facing functionality of the website.
Setup: Based on some research it seems that the way to go will be to use python's 'unittest' framework, along with flask's 'Flask-Testing' package. Piecing together the info at the following links should be able to lead to something that can work for us:
Implications of setup:
Example test: An example of the sort of test I'm thinking about is: "Create a new track round, and submit a track. Make sure that the track gets stored in the database and that the user's name shows up on the page upon the next 'get' of the round page"