django-nose
django-nose copied to clipboard
Allow using django-nose without setting DATABASES
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.
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.
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
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:',
}
}