mirror of
https://github.com/django/django.git
synced 2025-02-28 03:24:39 +00:00
Swapped out models don't have a _default_manager unless they have explicitly defined managers. ModelState.from_model() now accounts for this case and uses an empty list for managers if no explicit managers are defined and a model is swapped out.
To run the test suite:: $ cd tests $ pip install -r requirements/py3.txt # or py2.txt $ PYTHONPATH=..:$PYTHONPATH ./runtests.py For more information about the test suite, see https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/.