def tearDown(self):
if self._server is not None:<EOL><INDENT>self._server.stop()<EOL><DEDENT>self._server = None<EOL>from django.db import connection, close_old_connections<EOL>close_old_connections()<EOL>cur = connection.cursor()<EOL>cur.execute('<STR_LIT>')<EOL>cur.fetchall()<EOL>cur.close()<EOL>connection.close()<EOL>gevent.sleep()<EOL>super(DDPServerTestCase, self).tearDown()<EOL>
Stop the DDP server, and reliably close any open DB transactions.