views:

69

answers:

1

When running nosetests, django-nose runner doesn't supply --with-django option to nosetests, so my nose + Twill tests fail when trying to access URLs:

./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)

When I supply --with-django manually or set NOSE_WITH_DJANGO=1 enviromental variable, my tests run successfully, but then I receive following exception:

$ ./manage.py test --with-django
...
Ran 2 tests in 0.199s

OK
...
AttributeError: type object 'Template' has no attribute 'original_render'

nosetests --with-django runs tests successfully