Ticket #22003: live_server_testcase.patch

File live_server_testcase.patch, 629 bytes (added by garron, 19 months ago)

Patch containing a fix

  • django/test/testcases.py

    diff --git a/django/test/testcases.py b/django/test/testcases.py
    index 85ff66a..6980fa2 100644
    a b class LiveServerThread(threading.Thread): 
    11121112            self.error = e
    11131113            self.is_ready.set()
    11141114
     1115        if not self.connections_override:
     1116            # This thread has its own connections which will not get closed
     1117            # during testcase teardown.
     1118            for conn in connections.all():
     1119                conn.close()
     1120
    11151121    def join(self, timeout=None):
    11161122        if hasattr(self, 'httpd'):
    11171123            # Stop the WSGI server
Back to Top