mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Deprecated get_app().
This commit is contained in:
parent
2732edc5f2
commit
69039becde
13 changed files with 55 additions and 62 deletions
|
@ -1,5 +1,4 @@
|
|||
from django.apps import app_cache
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.test import TestCase
|
||||
from django.test.utils import override_settings
|
||||
from django.utils import six
|
||||
|
@ -31,6 +30,6 @@ class NoModelTests(TestCase):
|
|||
"""
|
||||
@override_settings(INSTALLED_APPS=("empty.no_models",))
|
||||
def test_no_models(self):
|
||||
with six.assertRaisesRegex(self, ImproperlyConfigured,
|
||||
with six.assertRaisesRegex(self, LookupError,
|
||||
"No app with label 'no_models'."):
|
||||
app_cache.get_app('no_models')
|
||||
app_cache.get_app_config('no_models')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue