We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 498d32f commit a893cafCopy full SHA for a893caf
django_nose/runner.py
@@ -440,7 +440,9 @@ def _should_create_database(connection):
440
# Connections are cached by some backends, if other code has connected
441
# to the database previously under a different database name the
442
# cached connection will be used and no exception will be raised.
443
- # Setting to null here solves that problem.
+ # Avoiding this by closing connections and setting to null
444
+ for connection in connections.all():
445
+ connection.close()
446
connection.connection = None
447
connection.cursor()
448
except Exception: # TODO: Be more discerning but still DB agnostic.
0 commit comments