Skip to content

Commit c6e1799

Browse files
committed
test: use an OS-agnostic way to allow all {% ssi %}
1 parent d287548 commit c6e1799

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

tests/plugin_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_settings():
5252

5353
if django.VERSION < (1, 10):
5454
# for {% ssi %}
55-
the_settings['TEMPLATES'][0]['OPTIONS']['allowed_include_roots'] = ['/']
55+
the_settings['TEMPLATES'][0]['OPTIONS']['allowed_include_roots'] = [""]
5656

5757
return the_settings
5858

tests/test_extends.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
"""Tests of template inheritance for django_coverage_plugin."""
55

6+
import os.path
7+
68
from .plugin_test import DjangoPluginTestCase, django_stop_before
79

810

@@ -170,7 +172,10 @@ def test_ssi_unparsed(self):
170172
self.assert_analysis([1, 2, 3], name="outer.html")
171173
self.assertEqual(
172174
set(self.measured_files()),
173-
set(["templates/outer.html", "templates/nested.html"])
175+
set([
176+
os.path.join("templates", "outer.html"),
177+
os.path.join("templates", "nested.html"),
178+
])
174179
)
175180

176181
def test_ssi_parsed(self):
@@ -190,5 +195,8 @@ def test_ssi_parsed(self):
190195
self.assert_analysis([1, 2, 3], name="outer.html")
191196
self.assertEqual(
192197
set(self.measured_files()),
193-
set(["templates/outer.html", "templates/nested.html"])
198+
set([
199+
os.path.join("templates", "outer.html"),
200+
os.path.join("templates", "nested.html"),
201+
])
194202
)

0 commit comments

Comments
 (0)