3👍
✅
Actually, according to the Django tutorial, the database is rolled back between each test. (See the bottom of the linked section.)
If you’re looking to have a common setup between tests, you should consider overriding the TestCase
method setUp
. This is run before each test function. The unittest
documentation should be helpful for this, and Django has an example in their documentation as well.
Source:stackexchange.com