Changes between Initial Version and Version 1 of Ticket #23640
- Timestamp:
- Oct 11, 2014, 10:45:33 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #23640 – Description
initial v1 1 When data migrations exist sfor a project, it is expected that each test case has these migrations run before running the test.1 When data migrations exist for a project, it is expected that each test case has these migrations run before running the test. 2 2 That is indeed the case for django.tests.TestCase (unit tests), but it is NOT working for django.contrib.staticfiles.testing.StaticLiveServerTestCase (functional tests). 3 3 4 Migrations seem to be run for each class, e.g. MyTestCase(StaticLiveServerTestCase), but not for the methods of this class. That is, if MyTestCase has 3 methods with tests, the migrations are only loaded for the first one, and then the database is wiped, and the objects from the data migration isno longer present for the next two methods.4 Migrations seem to be run for each class, e.g. MyTestCase(StaticLiveServerTestCase), but not for the methods of this class. That is, if MyTestCase has 3 methods with tests, the migrations are only loaded for the first one, and then the database is wiped, and the objects from the data migration are no longer present for the next two methods. 5 5 6 6 A minimal reproduction of this issue - along with a guide to the issue and which files to look at - can be found here: