diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-01-10 23:06:19 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-01-10 23:43:10 +0100 |
| commit | 3326a412ccde9f72e22a070a0b4d922048ed2286 (patch) | |
| tree | 7583ee99e53ab3d3bf846f1aec79dc34d330d2cf /tests | |
| parent | 81bb8d12209a419142b1bf6961fbf9fc44419dcd (diff) | |
Deprecated importing a model before loading its application.
Refs #21719, #21680.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/runtests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/runtests.py b/tests/runtests.py index bb14a27fd6..dcd9c885bd 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -130,6 +130,11 @@ def setup(verbosity, test_labels): 'django.contrib.comments is deprecated and will be removed before Django 1.8.', DeprecationWarning ) + warnings.filterwarnings( + 'ignore', + 'Model class django.contrib.comments.models.*supported in Django 1.9.', + PendingDeprecationWarning + ) # Load all the ALWAYS_INSTALLED_APPS. django.setup() @@ -169,8 +174,8 @@ def setup(verbosity, test_labels): if module_label not in settings.INSTALLED_APPS: settings.INSTALLED_APPS.append(module_label) app_config = AppConfig.create(module_label) - app_config.import_models(apps.all_models[app_config.label]) apps.app_configs[app_config.label] = app_config + app_config.import_models(apps.all_models[app_config.label]) apps.clear_cache() return state |
