I created a simple model test case using TestCase class. I created an object using setUp function and test the count of the object using assertEqual inside another function.
The test ran successfully, but when I check the Django admin, there was no object that I just created, and also…
</p>
https://docs.djangoproject.com/en/3.2/topics/testing/overview/#the-test-database
Top comments (0)