Skip to content

Commit 3832031

Browse files
committed
Added test and changelog entry for non-normalized path fix.
1 parent 637ba39 commit 3832031

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ Contributors
22
============
33

44
Carl Meyer <[email protected]>
5+
Eduard

CHANGES.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ CHANGES
44
0.2.0 (2011.06.26)
55
------------------
66

7+
* Fixed template-finding failure with non-normalized directories in
8+
``ICANHAZ_DIRS``. Thanks Eduardo for report and patch.
9+
710
* Made template-finding more flexible: ``ICANHAZ_DIR`` is now ``ICANHAZ_DIRS``
811
(a list); added ``ICANHAZ_FINDERS``, ``ICANHAZ_APP_DIRNAMES``, and finding of
912
templates in installed apps.

icanhaz/tests/test_finders.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ def test_find(self):
5050
os.path.join(here, "templates", "testtemplate.html"))
5151

5252

53+
@override_settings(
54+
ICANHAZ_DIRS=[os.path.join(here, "..", "tests", "templates")])
55+
def test_find_non_normalized_dir(self):
56+
self.assertEqual(
57+
self.finder.find("testtemplate"),
58+
os.path.join(here, "templates", "testtemplate.html"))
59+
60+
5361
@override_settings(ICANHAZ_DIRS=[os.path.join(here, "templates")])
5462
def test_find_non_existing(self):
5563
self.assertEqual(self.finder.find("doesntexist"), None)

0 commit comments

Comments
 (0)