﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19031	Add a warning that @override_settings may not work with DATABASES	Jonas H.	Joeri Bekker	"I'm aware of the fact that SQLite's `:memory:` mode doesn't work with threads, so I wanted to override `TEST_NAME` using `override_settings` to make SQLite use a filesystem DB for a single test:

{{{
from django.test import TransactionTestCase
from django.db import models
from django.test.utils import override_settings
from threading import Thread

class OverrideDATABASESTest(TransactionTestCase):
    @override_settings(DATABASES={'default': {'BACKEND': 'django.db.backends.sqlite3', 'TEST_NAME': 'test-db'}})
    def test_override_DATABASES(self):
        t = Thread(target=SomeModel.objects.get)
        t.start()
        t.join()
}}}

This doesn't work with threads, it fails with a `DatabaseError: no such table: app_modelname` exception in the thread. The test works if I set `TEST_NAME` in my `settings.py` though, so this seems like an issue with `override_settings`.
"	New feature	closed	Testing framework	dev	Normal	fixed		Joeri Bekker timograham@…	Accepted	1	0	0	0	1	0
