File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
tests/regressiontests/templates Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1765,9 +1765,7 @@ def test_include_only(self):
1765
1765
'none'
1766
1766
)
1767
1767
1768
-
1769
- @unittest .skipIf (' ' in __file__ ,
1770
- "The {%% ssi %%} tag in Django 1.4 doesn't support spaces in path." )
1768
+ skip_reason = "The {%% ssi %%} tag in Django 1.4 doesn't support spaces in path."
1771
1769
class SSITests (unittest .TestCase ):
1772
1770
def setUp (self ):
1773
1771
self .this_dir = os .path .dirname (os .path .abspath (__file__ ))
@@ -1778,11 +1776,13 @@ def render_ssi(self, path):
1778
1776
self .assertTrue (os .path .exists (path ))
1779
1777
return template .Template ('{%% ssi %s %%}' % path ).render (Context ())
1780
1778
1779
+ @unittest .skipIf (' ' in __file__ , skip_reason )
1781
1780
def test_allowed_paths (self ):
1782
1781
acceptable_path = os .path .join (self .ssi_dir , ".." , "first" , "test.html" )
1783
1782
with override_settings (ALLOWED_INCLUDE_ROOTS = (self .ssi_dir ,)):
1784
1783
self .assertEqual (self .render_ssi (acceptable_path ), 'First template\n ' )
1785
1784
1785
+ @unittest .skipIf (' ' in __file__ , skip_reason )
1786
1786
def test_relative_include_exploit (self ):
1787
1787
"""
1788
1788
May not bypass ALLOWED_INCLUDE_ROOTS with relative paths
You can’t perform that action at this time.
0 commit comments