﻿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
32409	TestCase async tests are not transaction-aware	David		"`SimpleTestCase` wraps each ''async'' test with `async_to_sync` (see [https://github.com/django/django/commit/17009e910538b9c3709d302f54c2d10eb245cf38 commit]).

When using `TestCase` this results in problems while accessing the database via `sync_to_async` (or with channels `database_sync_to_async`). Since under-the-hood `aync_to_sync` runs the async code in an other thread and savepoints (aka: transactions) are thread-bound what happens is that those tests do not interact with the actual (""expected"") database which is wrapped in a transaction bound to main thread.

"	New feature	closed	Testing framework	3.1	Normal	worksforme	TestCase, async, transaction	Andrew Godwin Carlton Gibson	Accepted	0	0	0	0	0	0
