Opened 5 years ago
Closed 5 years ago
#31009 closed Bug (wontfix)
Test database named just "test_".
Reported by: | rvernica | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When I do manage.py test
the database that is created is named only test_
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
Change History (2)
comment:2 by , 5 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Summary: | Test database named just "test_" → Test database named just "test_". |
Version: | 2.1 → master |
I agree with Simon, we don't want to parse cnf
files and we provide an option to specify the test database name.
Note:
See TracTickets
for help on using tickets.
Not sure what to do here. It looks like #30636 added tested support for using
read_default_file
withmanage.py
test but it assumedNAME
was provided.Given 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. Given atest_
database name is completely valid and this would yield cosmetic benefits I'm inclined to close this as wontfix.