Ticket #433 (closed enhancement: fixed)
Extract syncdb patching to separate function
|Reported by:||philip@…||Owned by:||andrew|
I have some code that manually calls the following to create a test database.
from django.db import connection
When using South, it turns out that you need to update what "syncdb" points to. South does this twice, in the test and testserver management server commands.
I'd like to propose to extract that common code into a function, which can be called easily by end users as well.
I'm attaching a simple patch. I've tested it in my own code. I've also run South's own tests. In those, the same 4 tests fail with my change and without it. Test output attached.
BTW: you might want to update http://south.aeracode.org/wiki/Contributing to mention that "SKIP_SOUTH_TESTS = False" must be put into settings.py, else the tests won't run silently.