1

I have a large django project (AskBot) that I am running the tests for. When I configure DATABASES to use sqlite, the tests pass. When I figure to use PostgreSQL, the tests pass, but when I configure to use MySQL, some of the tests fail. By inspecting the test database that is created during testing, I can see that the schema during the tests is missing some fields compared to the real schema. These fields seem to be present when I create the database using python manage.py syncdb and python manage.py migrate, but not present during the tests.

Is this a common behavior in django, or could someone experienced in django suggest a next step? Thanks.

1 Answer 1

1

If you haven't explicitly set SOUTH_TESTS_MIGRATE setting to False - test database will be created via south migrations. Try to set it to False and see if you will have any difference in schemes between normal syncdb and during the test run.

Hope I guessed right.

See also:

Sign up to request clarification or add additional context in comments.

1 Comment

100% correct! Setting this flag worked marvelously. It begs the follow-up question "why was the migrations failing?", but I guess I'll post that separately...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.