diff --git a/django_nose/runner.py b/django_nose/runner.py index 5e126f5..a663a9d 100644 --- a/django_nose/runner.py +++ b/django_nose/runner.py @@ -331,6 +331,11 @@ def setup_databases(self): creation = connection.creation test_db_name = creation._get_test_db_name() + # Close the connection ahead of doing a DB check as the connection + # may already be established which will short circuit the + # "should create" tests + connection.close() + # Mess with the DB name so other things operate on a test DB # rather than the real one. This is done in create_test_db when # we don't monkeypatch it away with _skip_create_test_db.