def test_context_processor_not_installed_in_TEMPLATES(self):
templates = deepcopy(settings.TEMPLATES)
templates[0]['OPTIONS']['context_processors'].remove(apps.CONTEXT)
with self.settings(TEMPLATES=templates):
errors = apps.check_context_processor_installed()
self.assertEqual(1, len(errors))
self.assertTrue(isinstance(errors[0], checks.Warning))
self.assertEqual('boardinghouse.W001', errors[0].id)
评论列表
文章目录