Ticket #75 (closed defect: fixed)

Opened 6 years ago

Last modified 5 years ago

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:

  1. manage.py migrate
  2. 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

simple_forum.zip (38.7 KB) - added by szczepiq@… 6 years ago.

Change History

Changed 6 years ago by szczepiq@…

comment:1 Changed 5 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.

Note: See TracTickets for help on using tickets.