--
Ticket URL: <https://code.djangoproject.com/ticket/18402>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
I saw a note [https://docs.djangoproject.com/en/dev/releases/1.4
/#database-connections-after-running-the-test-suite in the 1.4 release
notes] on database connections not getting restored after running a test
suite, and tried subclassing `django.test.simple.DjangoTestSuiteRunner`
and restoring the `teardown_databases` code from
[https://github.com/django/django/blob/1.3.1/django/test/simple.py#L318
Django 1.3] but this does not seem to do any good. :(
--
Ticket URL: <https://code.djangoproject.com/ticket/18402#comment:1>
* status: new => closed
* resolution: => wontfix
Comment:
You likely aren't using the TestRunner in any publicly documented way.
Still, it would be nice to know what the exact issue here is. The commit
that did the change to the database restoring after the tests is this:
f1dc83cb9877d349df88674a0752ddf42657485b. The commit contains some
stylistic cleanup, too, so you will need to read it carefully to see the
actual changes.
It seems pretty clear you are in fact hitting the issue mentioned in the
release notes - it seems you are trying to connect to the test database
after the first run, but that one is dropped. I would just call super()
and then go through all the connections in the overriding method and make
sure all connections have NAME set to the pre-test setting.
I am marking this one wontfix. If it seems there is need for some release
note changes or that the code in fact isn't backwards compatible, then
reopen this ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/18402#comment:2>
Comment (by David Eyk <deyk@…>):
Yeah, I figured. :) My usage is definitely a result of reverse-engineering
the test runner, rather than reading the docs. Thanks for the pointer to
the commit in question--that will be helpful. I'll update this ticket if I
find anything that might need your action.
--
Ticket URL: <https://code.djangoproject.com/ticket/18402#comment:3>