1
0
mirror of https://github.com/django/django.git synced 2024-11-18 07:26:04 +00:00
django/tests/fixtures
Anssi Kääriäinen ee9f4686b1 Fixed #23372 -- Made loaddata faster if it doesn't find any fixtures.
Django's test suite often tries to load fixture files from apps that have
no fixtures at all. This creates a lot of unnecessary disabling and
enabling of constraints which can be expensive on some database.

To speed this up, loaddata now first checks if any fixture file matches.
If no fixture file is matched, then the command exits before disabling
and enabling of constraints is done.

The main benefit of this change is seen on MSSQL, where tests on
Django 1.8 run hours faster.
2015-12-31 09:00:44 -05:00
..
fixtures Refs #24978 -- Amended test filename to avoid checkout warnings on Windows. 2015-06-20 14:22:57 -04:00
__init__.py
models.py Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 2015-07-27 18:28:13 -04:00
tests.py Fixed #23372 -- Made loaddata faster if it doesn't find any fixtures. 2015-12-31 09:00:44 -05:00