Sane testing and South (aka explicit better then implicit)

4 views
Skip to first unread message

Almad

unread,
Aug 31, 2009, 10:48:17 AM8/31/09
to Django: sane testing
Hi,

I'll mention it in docs, but for those of you using sane-testing
together with south:

Database is created only using syncdb, however south requires
'migrate' to be run. In our company, we have wrapper command for both
(and more stuff), which must be stored in settings as follows:

import project.utils
TEST_DATABASE_FLUSH_COMMAND = project.utils.flush_like_mumbo_jumbo
FLUSH_TEST_DATABASE_AFTER_INITIAL_SYNCDB = True

Please note that FLUSH_TEST_DATABASE_AFTER_INITIAL_SYNCDB must be
stored, otherwise some tests before first Destructive test case may
fail.

I'll probably add some south hacks inside sane-testing itself, but use
this for current compatibility ;)

Also note that You should encounter this only when doing end-to-end
tests using sane testing. When having only unittests, you should not
have south in installed apps as you should not test migrations.

Cheers,

Almad
Reply all
Reply to author
Forward
0 new messages