File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 33
44"""Tests of multiple engines for django_coverage_plugin."""
55
6+ from django_coverage_plugin import DjangoTemplatePluginException
7+
68from .plugin_test import DjangoPluginTestCase , django_start_at
79
810
@@ -36,3 +38,19 @@ def test_file_template(self):
3638 def test_string_template (self ):
3739 text = self .run_django_coverage (text = 'Hello' , using = 'other' )
3840 self .assertEqual (text , 'Hello' )
41+
42+ def test_third_engine_not_debug (self ):
43+ from django .test import modify_settings
44+ engine3 = {
45+ 'NAME' : 'notdebug' ,
46+ 'BACKEND' : 'django.template.backends.django.DjangoTemplates' ,
47+ 'DIRS' : ['templates3' ], # where the tests put things.
48+ }
49+ modified_settings = modify_settings (TEMPLATES = {'append' : [engine3 ]})
50+ modified_settings .enable ()
51+ self .addCleanup (modified_settings .disable )
52+
53+ self .make_template ('Hello' )
54+ msg = "Template debugging must be enabled in settings."
55+ with self .assertRaisesRegexp (DjangoTemplatePluginException , msg ):
56+ self .run_django_coverage ()
You can’t perform that action at this time.
0 commit comments