我目前正在try 使用Hudson CI自动化Django测试,如果测试数据库已经存在,我正在努力寻找一个自动销毁它的选项(通常它会要求确认销毁它,这显然是自动测试无法提供的).
如有任何建议,我们将不胜感激!
干杯, R
我目前正在try 使用Hudson CI自动化Django测试,如果测试数据库已经存在,我正在努力寻找一个自动销毁它的选项(通常它会要求确认销毁它,这显然是自动测试无法提供的).
如有任何建议,我们将不胜感激!
干杯, R
使用--help查看test命令的文档:
>>> ./manage.py test --help
Usage: ./manage.py test [options] [appname ...]
Runs the test suite for the specified applications, or the entire site if no apps are specified.
[...]
--noinput Tells Django to NOT prompt the user for input of any
kind.
并使用--noinput,默认销毁测试数据库;)