summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-12-22 11:36:49 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-12-22 11:39:55 +0100
commit690d1cb8d0341ac71613f6bb93f0793335ec6dfd (patch)
tree73d8a8748fc9dcb97b6fc383f83f7f892bd01759
parent2fef9e5375b0267734392080858d9fced15ee2f9 (diff)
Made AppConfig importable from django.apps.
It is a public API.
-rw-r--r--django/apps/__init__.py1
-rw-r--r--tests/test_runner/tests.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/django/apps/__init__.py b/django/apps/__init__.py
index 0384b1257d..a1193eafcc 100644
--- a/django/apps/__init__.py
+++ b/django/apps/__init__.py
@@ -1 +1,2 @@
+from .base import AppConfig # NOQA
from .cache import app_cache, UnavailableApp # NOQA
diff --git a/tests/test_runner/tests.py b/tests/test_runner/tests.py
index 5393ea75a2..0daf4ab3b7 100644
--- a/tests/test_runner/tests.py
+++ b/tests/test_runner/tests.py
@@ -224,7 +224,7 @@ class ModulesTestsPackages(IgnoreAllDeprecationWarningsMixin, unittest.TestCase)
def test_get_tests(self):
"Check that the get_tests helper function can find tests in a directory"
- from django.apps.base import AppConfig
+ from django.apps import AppConfig
from django.test.simple import get_tests
app_config = AppConfig.create('test_runner.valid_app')
app_config.import_models({})
@@ -233,7 +233,7 @@ class ModulesTestsPackages(IgnoreAllDeprecationWarningsMixin, unittest.TestCase)
def test_import_error(self):
"Test for #12658 - Tests with ImportError's shouldn't fail silently"
- from django.apps.base import AppConfig
+ from django.apps import AppConfig
from django.test.simple import get_tests
app_config = AppConfig.create('test_runner_invalid_app')
app_config.import_models({})