django/tests/test_runner
Harm Geerts b89ce413f2 [3.2.x] Fixed #29052 -- Made test database creation preserve alias order and prefer the "default" database.
This fixes flushing test databases when two aliases point to the same
database.

Use a list() to store the test database aliases so the order remains
stable by following the order of the connections. Also, always use the
"default" database alias as the first alias to accommodate `migrate`.

Previously `migrate` could be executed on a secondary alias which
caused truncating the "default" database.

Backport of 06e5f7ae16 from master
2021-02-16 13:08:13 +01:00
..
__init__.py
models.py Fixed #29559 -- Fixed TransactionTestCase.reset_sequences for auto-created m2m through models. 2018-07-11 17:20:29 -04:00
runner.py Removed parser.add_arguments() arguments that match the defaults. 2018-07-02 17:54:57 -04:00
test_debug_sql.py Fixed #32227 -- Prevented crash when setUpTestData() errors with --debug-sql. 2020-11-28 12:22:59 +01:00
test_discover_runner.py Refs #31811 -- Added optional timing outputs to the test runner. 2020-08-13 17:17:15 +02:00
test_parallel.py Refs #29926 -- Bumped minimum tblib version to 1.5.0 in test requirements. 2019-10-23 15:26:04 +02:00
tests.py [3.2.x] Fixed #29052 -- Made test database creation preserve alias order and prefer the "default" database. 2021-02-16 13:08:13 +01:00