Changes between Initial Version and Version 1 of Ticket #23640


Ignore:
Timestamp:
Oct 11, 2014, 10:45:33 AM (10 years ago)
Author:
Ruben Nielsen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23640 – Description

    initial v1  
    1 When data migrations exists for a project, it is expected that each test case has these migrations run before running the test.
     1When data migrations exist for a project, it is expected that each test case has these migrations run before running the test.
    22That is indeed the case for django.tests.TestCase (unit tests), but it is NOT working for django.contrib.staticfiles.testing.StaticLiveServerTestCase (functional tests).
    33
    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 is no longer present for the next two methods.
     4Migrations 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.
    55
    66A minimal reproduction of this issue - along with a guide to the issue and which files to look at - can be found here:
Back to Top