--with-django
ノーズテストを実行するとき、django-nose runner はにオプションを提供しないnosetests
ため、URL にアクセスしようとするとノーズ + Twill テストが失敗します。
./manage.py test
...
raise BrowserStateError("cannot go to '%s'" % (url,))
BrowserStateError: cannot go to 'http://127.0.0.1:8088/admin/'
----------------------------------------------------------------------
Ran 2 tests in 0.166s
FAILED (errors=1)
手動で指定--with-django
するか、環境変数を設定NOSE_WITH_DJANGO=1
すると、テストは正常に実行されますが、次の例外が発生します。
$ ./manage.py test --with-django
...
Ran 2 tests in 0.199s
OK
...
AttributeError: type object 'Template' has no attribute 'original_render'
nosetests --with-django
テストを正常に実行します