summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-03-22 12:23:38 -0700
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-03-22 12:23:38 -0700
commitd5ee38b6234d6ee9260ff8d872124b4480395067 (patch)
tree37ce4c7ec59058eaaff32d4ac60b4a91d15502ad
parent70b597e803d3e59ec5dc606665800ee180b32140 (diff)
downloadpystache-d5ee38b6234d6ee9260ff8d872124b4480395067.tar.gz
Added some TODO's around custom_template.
-rw-r--r--pystache/custom_template.py4
-rw-r--r--tests/test_custom_template.py5
2 files changed, 9 insertions, 0 deletions
diff --git a/pystache/custom_template.py b/pystache/custom_template.py
index 0b30470..a636d44 100644
--- a/pystache/custom_template.py
+++ b/pystache/custom_template.py
@@ -126,6 +126,7 @@ class Loader(object):
"""
+ # TODO: rename template_locator to locator.
def __init__(self, search_dirs, template_locator=None, reader=None):
if reader is None:
reader = Reader()
@@ -135,8 +136,10 @@ class Loader(object):
self.reader = reader
self.search_dirs = search_dirs
+ # TODO: rename this to locator.
self.template_locator = template_locator
+ # TODO: make this private.
def get_relative_template_location(self, view):
"""
Return the relative template path as a (dir, file_name) pair.
@@ -156,6 +159,7 @@ class Loader(object):
return (template_dir, file_name)
+ # TODO: make this private.
def get_template_path(self, view):
"""
Return the path to the view's associated template.
diff --git a/tests/test_custom_template.py b/tests/test_custom_template.py
index a159fcd..db6040d 100644
--- a/tests/test_custom_template.py
+++ b/tests/test_custom_template.py
@@ -134,6 +134,11 @@ class ViewTestCase(unittest.TestCase):
self.assertEquals(view.render(), """one, two, three, empty list""")
+# TODO: switch these tests to using the CustomizedTemplate class instead of View.
+# TODO: rename the get_template() tests to test load().
+# TODO: condense, reorganize, and rename the tests so that it is
+# clear whether we have full test coverage (e.g. organized by
+# CustomizedTemplate attributes or something).
class LoaderTests(unittest.TestCase, AssertIsMixin):
# TODO: rename this method to _make_loader().