Opened 13 years ago

Last modified 13 years ago

#16466 closed Bug

Similar to ticket 16250, _destroy_test_db calls self.set_autocommit() — at Initial Version

Reported by: ryazwinski Owned by: nobody
Component: Database layer (models, ORM) Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Destroying test database for alias 'default'...
Traceback (most recent call last):

File "manage.py", line 11, in <module>

execute_manager(settings)

File "/usr/local/lib/python2.6/dist-packages/django/core/management/init.p

y", line 438, in execute_manager

utility.execute()

File "/usr/local/lib/python2.6/dist-packages/django/core/management/init.py", line 379, in execute

self.fetch_command(subcommand).run_from_argv(self.argv)

File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 191, in run_from_argv

self.execute(*args, options.dict)

File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 220, in execute

output = self.handle(*args, options)

File "/usr/local/lib/python2.6/dist-packages/django/core/management/commands/test.py", line 37, in handle

failures = test_runner.run_tests(test_labels)

File "/usr/local/lib/python2.6/dist-packages/django/test/simple.py", line 361, in run_tests

self.teardown_databases(old_config)

File "/usr/local/lib/python2.6/dist-packages/django/test/simple.py", line 327, in teardown_databases

connection.creation.destroy_test_db(old_name, self.verbosity)

File "/usr/local/lib/python2.6/dist-packages/django/db/backends/creation.py", line 452, in destroy_test_db

self._destroy_test_db(test_database_name, verbosity)

File "/usr/local/lib/python2.6/dist-packages/django/db/backends/creation.py", line 461, in _destroy_test_db

self.set_autocommit()

File "/usr/local/lib/python2.6/dist-packages/django/db/backends/creation.py", line 472, in set_autocommit

self.connection.connection.autocommit = True

psycopg2.ProgrammingError: autocommit cannot be used inside a transaction

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top