I have some unit tests that I wrote to test my Django application. In one test suite, in particular, there is a lot of code in its function setUp(). The purpose of this code is to create test data for the database. (Yes, I know about lamps and decided not to use them in this case). When I run the unit test package, the first test that runs fails, but then the rest of the tests in the package fail. The message for all crashes is the same: it mentions that the error location is "self.database_object.save ()" and the reason is that "IntegrityError: column name is not unique." So, I think Django is not breaking the database properly after each test.
He worked earlier today, but I think I ruined some refactoring. Any ideas on why Django is not properly monitoring the database after each test?
source
share