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)
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)
def basic_context(self): return contextlib.nested(django_template(), django_settings({'COMPILER_ROOT': '/'}), django_exceptions(), paths_exist('/css', '/js'))
def basic_context(self): return contextlib.nested(django_template(), django_settings({'COMPILER_ROOT':'/'}), django_exceptions(), paths_exist('/css', '/js'))