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

Already on GitHub? Sign in to your account

Trigger request_finished in the WSGI iterable's close(). #612

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
2 participants
Owner

aaugustin commented Dec 30, 2012

No description provided.

@akaariai akaariai and 1 other commented on an outdated diff Dec 30, 2012

django/test/simple.py
@@ -17,6 +19,10 @@
doctestOutputChecker = OutputChecker()
+# Disconnect the signal that was connected in django.db
+# (imported above) so the database connection stays open.
+signals.request_finished.disconnect(close_connection)
+
@akaariai

akaariai Dec 30, 2012

Member

Should this be done as part of running the tests instead of doing it as side effect of import. I am wondering if somebody could import the django.test.simple without running tests.

@aaugustin

aaugustin Dec 30, 2012

Owner

Indeed, that's quite a footgun. I will see if it can be done in a better way.

Owner

aaugustin commented Dec 31, 2012

Merged today.

@aaugustin aaugustin closed this Dec 31, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment