django-nose icon indicating copy to clipboard operation
django-nose copied to clipboard

Allow using django-nose without setting DATABASES

Open robgolding opened this issue 11 years ago • 3 comments

The DjangoSetUpPlugin calls self.runner.setup_databases(), which fails if settings.DATABASES is not set. You shouldn't be required to have a database configured to use django-nose, so perhaps this should only happen if one is in use.

robgolding avatar Mar 07 '14 17:03 robgolding

Agree. We use Cassandra in our project instead of an SQL database which means we don't use settings.DATABASES, and this behaviour is preventing us from using this app.

fvieira avatar Mar 10 '14 14:03 fvieira

Also you can't use in-memory SQL databases at the moment

django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the NAME value.

That sucks

schmitch avatar Jul 07 '14 14:07 schmitch

There has been a lot of work in the Django side of things in django/test/runner.py setup_databases(), which may not be reflected in the django-nose version. This might include allowing an empty settings.DATABASES. I'm still using PostgreSQL, so I'm not familiar with this world. PR welcome.

Does an in-memory SQLite database let you get around it?

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': ':memory:',
    }
}

jwhitlock avatar Jul 02 '15 22:07 jwhitlock