I'm running a series of unit tests on a view, but I'm noticing that the database which is being accessed in each test isn't changing.
For example, the first test I might run might have the command:
Post.objects.create(title='TEST1',...)
and if I get the response, the queryset will contain:
However, all tests I run after this will return the same
<Post: TEST1>
No test, other than the first one, creates an object with the title 'TEST1'; they are all created with other numbers, e.g. 'TEST2', 'TEST3', etc.
Additionally, if I run the tests individually, I have no problems, but if I run all the tests for the application, these errors arise. Does anyone know what's happening? I'm using django.test.TestCase
for all tests.