Make All Tests Pass
Explore the process of running all unit tests in Django to confirm that newly implemented features work correctly without causing failures in existing functionality. Understand how to identify and fix test failures caused by regressions. This lesson helps you ensure your code passes all tests before moving on to refactoring for better quality.
We'll cover the following...
We'll cover the following...
In this step, we rerun the tests, including older ones, and make sure they pass. Therefore, we must make sure that the feature being added doesn’t make the previous test fail, thereby breaking past functionality.
How does it work?
Here, we basically redo the action we performed in step two. However, this time, we shouldn’t get any failed tests if the actual code we write was well implemented:
$ python manage.py test
...