nose-devs/nose — Issue #389: Exception AttributeError: type object 'Template' has no attribute 'original_render' raised when running nose with --with-django option throught django-admin.py
Author: jpellerin
Created: 2011-12-14 16:09:43+00:00
State: open

What steps will reproduce the problem?
1. Having a DatabaseTestCase
2. Run django-admin.py test --with-django and have TEST_RUNNER in settings set to 'django_nose.NoseTestSuiteRunner'
3. Test passes OK, but at the end, AttritbuteError is raised.

What is the expected output? What do you see instead?
Expected output would be script terminating without error. Instead, following traceback is returned:

Traceback (most recent call last):
File "/var/www/python/ve/dronte/bin/django-admin.py", line 5, in
management.execute_from_command_line()
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/django/core/management/__init__.py", line 429, in execute_from_command_line
utility.execute()
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/django/core/management/base.py", line 218, in execute
output = self.handle(*args, **options)
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/south/management/commands/test.py", line 8, in handle
super(Command, self).handle(*args, **kwargs)
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/django/core/management/commands/test.py", line 37, in handle
failures = test_runner.run_tests(test_labels)
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/django_nose/runner.py", line 85, in run_tests
result = self.run_suite(nose_argv)
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/django_nose/runner.py", line 49, in run_suite
addplugins=plugins_to_add)
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/nose/core.py", line 117, in __init__
**extra_args)
File "/usr/lib/python2.6/unittest.py", line 817, in __init__
self.runTests()
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/nose/core.py", line 196, in runTests
result = self.testRunner.run(self.test)
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/nose/core.py", line 65, in run
self.config.plugins.finalize(result)
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/nose/plugins/manager.py", line 93, in __call__
return self.call(*arg, **kw)
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/nose/plugins/manager.py", line 161, in simple
result = meth(*arg, **kw)
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/django_nose/plugin.py", line 46, in finalize
self.runner.teardown_test_environment()
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/django/test/simple.py", line 287, in teardown_test_environment
teardown_test_environment()
File "/var/www/python/ve/dronte/lib/python2.6/site-packages/django/test/utils.py", line 59, in teardown_test_environment
Template._render = Template.original_render
AttributeError: type object 'Template' has no attribute 'original_render'

When running test throught nosetests, nothing happens and scripts terminates as expected.

What version of the product are you using? On what operating system?
Nose 0.11, Django 1.2

Please provide any additional information below.

Google Code Info:
Issue #: 365
Author: xarali...@gmail.com
Created On: 2010-09-21T13:32:25.000Z
Closed On: