Re: [Django] #36330: Allow specifying DATABASES["default"]["TEST"]["ENGINE"] and ["TEST"]["OPTIONS"] (was: Allow specifying DATABASES["default"]["TEST"]["ENGINE"])

1 view
Skip to first unread message

Django

unread,
Apr 16, 2025, 5:31:22 PMApr 16
to django-...@googlegroups.com
#36330: Allow specifying DATABASES["default"]["TEST"]["ENGINE"] and
["TEST"]["OPTIONS"]
-----------------------------------+--------------------------------------
Reporter: Collin Anderson | Owner: (none)
Type: New feature | Status: new
Component: Testing framework | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Collin Anderson):

* summary: Allow specifying DATABASES["default"]["TEST"]["ENGINE"] =>
Allow specifying DATABASES["default"]["TEST"]["ENGINE"] and
["TEST"]["OPTIONS"]


Old description:

> Would be nice to be able to set `DATABASES["default"]["TEST"]["ENGINE"] =
> "django.db.backends.sqlite3"` for running tests in an in-memory database.
>
> See also #30084: Setting `DATABASES['default']['TEST']['engine']` to
> SQLite does not cause Django to use an in-memory database as expected

New description:

Would be nice to be able to set `DATABASES["default"]["TEST"]["ENGINE"] =
"django.db.backends.sqlite3"` for running tests in an in-memory database.

See also #30084: Setting `DATABASES['default']['TEST']['engine']` to
SQLite does not cause Django to use an in-memory database as expected

In my case I'd also need to set `DATABASES["default"]["TEST"]["OPTIONS"] =
{}` because I don't want to pass those options to sqlite.

`ENGINE` and `OPTIONS` aren't options here:
https://docs.djangoproject.com/en/dev/ref/settings/#std-setting-DATABASE-
TEST

--
--
Ticket URL: <https://code.djangoproject.com/ticket/36330#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages