mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #21829 -- Added default AppConfigs.
Thanks Russell for the report, Marc for the initial patch, Carl for the final review, and everyone who contributed to the design discussion.
This commit is contained in:
@@ -7,6 +7,7 @@ from django.db import models
|
||||
from django.test import TestCase, override_settings
|
||||
from django.utils import six
|
||||
|
||||
from .default_config_app.apps import CustomConfig
|
||||
from .models import TotallyNormal, SoAlternative, new_apps
|
||||
|
||||
|
||||
@@ -82,6 +83,11 @@ class AppsTests(TestCase):
|
||||
with self.settings(INSTALLED_APPS=['apps.apps.NoSuchConfig']):
|
||||
pass
|
||||
|
||||
def test_default_app_config(self):
|
||||
with self.settings(INSTALLED_APPS=['apps.default_config_app']):
|
||||
config = apps.get_app_config('default_config_app')
|
||||
self.assertIsInstance(config, CustomConfig)
|
||||
|
||||
@override_settings(INSTALLED_APPS=SOME_INSTALLED_APPS)
|
||||
def test_get_app_configs(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user