Ticket #75 (closed defect: fixed)
migrations seem not to be executed before tests
| Reported by: | szczepiq@… | Owned by: | andrew |
|---|---|---|---|
| Priority: | critical | Milestone: | |
| Component: | migrations | Version: | 0.6-pre |
| Keywords: | Cc: |
Description
See attached simple application.
Steps to reproduce:
- manage.py migrate
- manage.py test
Expected tests to pass because one of the migrations inserts single 'Topic' object. This topic object is visible if I do 'manage.py shell' but it is not in db when I do 'manage.py test'.
It seems tests trigger ordinary 'syncdb' instead of 'migrate'. Or am I not understanding how it should work?
Attachments
Change History
comment:1 Changed 4 years ago by andrew
- Status changed from new to closed
- Resolution set to fixed
Argh, I missed this ticket, many apologies. We changed the test runner to not use migrations by default back in 0.4; however, we seem to have forgotten to provide an option to turn it back on.
Thus, as of [148], if you define SOUTH_TESTS_MIGRATE = True in the settings, South will run migrations before tests, not a full syncdb.
