Django,鼻子和硒......初始状态错误

时间:2012-06-27 10:51:52

标签: django selenium nose django-testing django-nose

我为Django 1.3.1安装了所有内容:django-nosedjango-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.

任何想法?

1 个答案:

答案 0 :(得分:0)

您是否将'django_nose'添加到INSTALLED_APPS?