Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception AttributeError: type object 'Template' has no attribute 'original_render' raised when running nose with --with-django option throught django-admin.py #389

Open
jpellerin opened this issue Dec 14, 2011 · 0 comments
Assignees

Comments

@jpellerin
Copy link
Member

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:

@ghost ghost assigned jpellerin Dec 14, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant