In `settings.py` I have:
{{{
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'OPTIONS': {
'read_default_file': 'app/my.cnf',
},
}
}
}}}
while in `my.cfg` I have:
{{{
[client]
host = db
database = foo
user = bar
password = taz
default-character-set = utf8
}}}
I expect that the test database be called `test_foo`
--
Ticket URL: <https://code.djangoproject.com/ticket/31009>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Simon Charette):
Not sure what to do here. It looks like #30636 added tested support for
using `read_default_file` with `manage.py` test but it assumed `NAME` was
provided.
Given [https://docs.djangoproject.com/en/2.2/ref/settings/#test we already
provide an option] to specify the test database name I'm not convinced
teaching the test database name generation logic to parse CNF files if
`NAME` is not provided is worth the complexity it incurs. I'm inclined to
close this as ''wontfix''.
--
Ticket URL: <https://code.djangoproject.com/ticket/31009#comment:1>
* status: new => closed
* version: 2.1 => master
* resolution: => wontfix
Comment:
I agree with Simon, we don't want to parse `cnf` files and we provide an
option to specify the test database name.
--
Ticket URL: <https://code.djangoproject.com/ticket/31009#comment:2>