예제 #1
0
 def test_bad_settings_compiler_root_dne(self):
     with contextlib.nested(django_exceptions(), django_template(), django_settings({'COMPILER_ROOT':'directory/doesnt/exist'})):
         from django.core.exceptions import ImproperlyConfigured
         from compilation.templatetags.compiler import CompilerNode
         html = "<script type=\"text/javascript\">testing</script>"
         nodelist = MockNodelist(html)
         compiler_node = CompilerNode(nodelist)
         self.assertRaises(ImproperlyConfigured, compiler_node.render, None)
예제 #2
0
 def test_bad_settings_compiler_root_dne(self):
     with contextlib.nested(
             django_exceptions(), django_template(),
             django_settings({'COMPILER_ROOT': 'directory/doesnt/exist'})):
         from django.core.exceptions import ImproperlyConfigured
         from compilation.templatetags.compiler import CompilerNode
         html = "<script type=\"text/javascript\">testing</script>"
         nodelist = MockNodelist(html)
         compiler_node = CompilerNode(nodelist)
         self.assertRaises(ImproperlyConfigured, compiler_node.render, None)
예제 #3
0
 def basic_context(self):
     return contextlib.nested(django_template(),
                              django_settings({'COMPILER_ROOT': '/'}),
                              django_exceptions(),
                              paths_exist('/css', '/js'))
예제 #4
0
 def basic_context(self):
     return contextlib.nested(django_template(), django_settings({'COMPILER_ROOT':'/'}), django_exceptions(), paths_exist('/css', '/js'))