Commit d5ee38b6 by Chris Jerdonek

Added some TODO's around custom_template.

parent 70b597e8
...@@ -126,6 +126,7 @@ class Loader(object): ...@@ -126,6 +126,7 @@ class Loader(object):
""" """
# TODO: rename template_locator to locator.
def __init__(self, search_dirs, template_locator=None, reader=None): def __init__(self, search_dirs, template_locator=None, reader=None):
if reader is None: if reader is None:
reader = Reader() reader = Reader()
...@@ -135,8 +136,10 @@ class Loader(object): ...@@ -135,8 +136,10 @@ class Loader(object):
self.reader = reader self.reader = reader
self.search_dirs = search_dirs self.search_dirs = search_dirs
# TODO: rename this to locator.
self.template_locator = template_locator self.template_locator = template_locator
# TODO: make this private.
def get_relative_template_location(self, view): def get_relative_template_location(self, view):
""" """
Return the relative template path as a (dir, file_name) pair. Return the relative template path as a (dir, file_name) pair.
...@@ -156,6 +159,7 @@ class Loader(object): ...@@ -156,6 +159,7 @@ class Loader(object):
return (template_dir, file_name) return (template_dir, file_name)
# TODO: make this private.
def get_template_path(self, view): def get_template_path(self, view):
""" """
Return the path to the view's associated template. Return the path to the view's associated template.
......
...@@ -134,6 +134,11 @@ class ViewTestCase(unittest.TestCase): ...@@ -134,6 +134,11 @@ class ViewTestCase(unittest.TestCase):
self.assertEquals(view.render(), """one, two, three, empty list""") 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): class LoaderTests(unittest.TestCase, AssertIsMixin):
# TODO: rename this method to _make_loader(). # TODO: rename this method to _make_loader().
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment