mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Refs #31180 -- Fixed unreachable assertions in apps tests.
This commit is contained in:
parent
804f2b7024
commit
287e36bd22
@ -501,8 +501,13 @@ class DeprecationTests(SimpleTestCase):
|
||||
)
|
||||
with self.assertRaisesMessage(RemovedInDjango41Warning, msg):
|
||||
with self.settings(INSTALLED_APPS=['apps.explicit_default_config_app']):
|
||||
config = apps.get_app_config('explicit_default_config_app')
|
||||
self.assertIsInstance(config, ExplicitDefaultConfig)
|
||||
pass
|
||||
with ignore_warnings(category=RemovedInDjango41Warning):
|
||||
with self.settings(INSTALLED_APPS=['apps.explicit_default_config_app']):
|
||||
self.assertIsInstance(
|
||||
apps.get_app_config('explicit_default_config_app'),
|
||||
ExplicitDefaultConfig,
|
||||
)
|
||||
|
||||
def test_explicit_default_app_config_mismatch(self):
|
||||
"""
|
||||
@ -522,8 +527,13 @@ class DeprecationTests(SimpleTestCase):
|
||||
)
|
||||
with self.assertRaisesMessage(RemovedInDjango41Warning, msg):
|
||||
with self.settings(INSTALLED_APPS=['apps.explicit_default_config_mismatch_app']):
|
||||
config = apps.get_app_config('explicit_default_config_mismatch_app')
|
||||
self.assertIsInstance(config, ExplicitDefaultConfigMismatch)
|
||||
pass
|
||||
with ignore_warnings(category=RemovedInDjango41Warning):
|
||||
with self.settings(INSTALLED_APPS=['apps.explicit_default_config_mismatch_app']):
|
||||
self.assertIsInstance(
|
||||
apps.get_app_config('explicit_default_config_mismatch_app'),
|
||||
ExplicitDefaultConfigMismatch,
|
||||
)
|
||||
|
||||
def test_explicit_default_app_config_empty_apps(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user