Skip to content

Commit

Permalink
Apply jazzband#101
Browse files Browse the repository at this point in the history
for bug jazzband#76

When REUSE_DB=1, the test suite would end up using the non-test database
  • Loading branch information
chris-newfoundry committed Sep 8, 2014
1 parent b81f847 commit 65de2be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions django_nose/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@ def _should_create_database(connection):

# Notice whether the DB exists, and create it if it doesn't:
try:
# Slight modification to fix proposed at
# https://github.com/jbalogh/django-nose/pull/101
# for bug https://github.com/jbalogh/django-nose/issues/76
for conn in connections.all():
conn.close()
connection.cursor()
except Exception: # TODO: Be more discerning but still DB agnostic.
return True
Expand Down

0 comments on commit 65de2be

Please sign in to comment.