-
-
Notifications
You must be signed in to change notification settings - Fork 239
Description
_foreign_key_ignoring_handle
in django_nose.runner
has this comment:
django-nose/django_nose/runner.py
Lines 316 to 321 in 5e824f5
def _foreign_key_ignoring_handle(self, *fixture_labels, **options): | |
"""Wrap the the stock loaddata to ignore foreign key checks. | |
This allows loading circular references from fixtures, and is | |
monkeypatched into place in setup_databases(). | |
""" |
This was brought over in #50, a large refactor to merge in the test-utils project.
This code presented problems when fixtures were loaded with Django 2.0, which were tracked down to assumptions about the commit
argument, removed in Django 1.5 (see #307 (comment)). The code was fixed in #308, and @dlareau suggested the code should be revisited (see #307 (comment)).
It is possible that modern Django has other methods for loading fixtures while avoiding circular imports, and _foreign_key_ignoring_handle
should be retired. A good first step would be to add a django-nose test that exercises loading fixtures, ideally with a circular reference.