我为Django 1.3.1安装了所有内容:django-nose
,django-nose-selenium
,并设置了测试运行器:
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
首先似乎通过运行命令$./manage.py test
,Django的内部测试开始运行而不是Nose。
其次,通过运行$nosetests
我得到了这个:
/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin selenium = noseselenium.plugins:SeleniumPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
RuntimeWarning)
/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin djangoliveserver = noseselenium.plugins:DjangoLiveServerPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
RuntimeWarning)
/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin cherrypyliveserver = noseselenium.plugins:CherryPyLiveServerPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
RuntimeWarning)
/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin selenium_fixtures = noseselenium.plugins:SeleniumFixturesPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
任何想法?
答案 0 :(得分:0)
您是否将'django_nose'添加到INSTALLED_APPS?