You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This fixes the following error when South tries to access
`management._commands`, which has been dropped in Django 1.7:
…/pytest_django/pytest_django/fixtures.py:41: in _django_db_setup
_handle_south()
…/pytest_django/pytest_django/fixtures.py:128: in _handle_south
patch_for_test_db_setup()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def patch_for_test_db_setup():
# Load the commands cache
management.get_commands()
# Repoint to the correct version of syncdb
if hasattr(settings, "SOUTH_TESTS_MIGRATE") and not settings.SOUTH_TESTS_MIGRATE:
# point at the core syncdb command when creating tests
# tests should always be up to date with the most recent model structure
management._commands['syncdb'] = 'django.core'
else:
> management._commands['syncdb'] = MigrateAndSyncCommand()
E AttributeError: 'module' object has no attribute '_commands'
…/site-packages/south/management/commands/__init__.py:34: AttributeError
0 commit comments