From c07c7fce2cecd4295894ca78085a473aaba5a13a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 18 Apr 2017 14:58:49 +0200 Subject: Django 1.8: new app management --- ishtar_common/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index 133bd5a9b..49db86b64 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -156,8 +156,8 @@ class ManagedModelTestRunner(DiscoverRunner): to execute the SQL manually to create them. """ def setup_test_environment(self, *args, **kwargs): - from django.db.models.loading import get_models - self.unmanaged_models = [m for m in get_models() + from django.apps import apps + self.unmanaged_models = [m for m in apps.get_models() if not m._meta.managed] for m in self.unmanaged_models: m._meta.managed = True -- cgit v1.2.3