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

6 views
Skip to first unread message

Django

unread,
Apr 17, 2025, 12:34:37 AM4/17/25
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
-----------------------------------+--------------------------------------
Comment (by Simon Charette):

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

Putting aside the technical challenges involved in making this happen
(test databases are created through a `create_test_db` method on the
database engine itself) we usually warn against running tests against a
different databases than what's used in production for the project as the
ORM abstraction layer is far from air tight across backends.

Are you hoping to do this in order to use an in-memory database for your
SQLite backed project or are you trying to use SQLite for a non-SQLite
backed project?
--
Ticket URL: <https://code.djangoproject.com/ticket/36330#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 17, 2025, 3:23:13 AM4/17/25
to django-...@googlegroups.com
#36330: Allow specifying DATABASES["default"]["TEST"]["ENGINE"] and
["TEST"]["OPTIONS"]
-----------------------------------+--------------------------------------
Reporter: Collin Anderson | Owner: (none)
Type: New feature | Status: closed
Component: Testing framework | Version: 5.2
Severity: Normal | Resolution: wontfix
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 Sarah Boyce):

* resolution: => wontfix
* status: new => closed

Comment:

Thank you for the report
When requesting a new feature, the recommended path forward is to first
propose and discuss the idea with the community and gain consensus. To do
that, please consider starting a new conversation on the
[https://forum.djangoproject.com/c/internals/5 Django Forum], where you'll
reach a broader audience and receive additional feedback.

I'll close the ticket for now, but if the community agrees with the
proposal, please return to this ticket and reference the forum discussion
so we can re-open it. For more information, please refer to
[https://docs.djangoproject.com/en/stable/internals/contributing/bugs-and-
features/#requesting-features the documented guidelines for requesting
features].

Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/36330#comment:3>
Reply all
Reply to author
Forward
0 new messages