开发者

Disable Django South when running unit tests?

开发者 https://www.devze.com 2023-02-28 18:34 出处:网络
Disable Django South when running unit tests?How do you avoid running al开发者_如何学编程l of the south migrations when doing django unit testing?Yes, the South documentation describes how to do it, b

Disable Django South when running unit tests? How do you avoid running al开发者_如何学编程l of the south migrations when doing django unit testing?


Yes, the South documentation describes how to do it, but basically just add this to your settings.py file:

SOUTH_TESTS_MIGRATE = False # To disable migrations and use syncdb instead
SKIP_SOUTH_TESTS = True # To disable South's own unit tests


Even though, you have selected the good answer, I think that you should consider the option SOUTH_TESTS_MIGRATE instead. It will prevent to run all the migrations on your test db, and run syncdb instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号