diff options
-rw-r--r-- | pystache/custom_template.py | 9 | ||||
-rw-r--r-- | tests/test_custom_template.py | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/pystache/custom_template.py b/pystache/custom_template.py index a636d44..dce4861 100644 --- a/pystache/custom_template.py +++ b/pystache/custom_template.py @@ -126,18 +126,17 @@ class Loader(object): """ - # TODO: rename template_locator to locator. - def __init__(self, search_dirs, template_locator=None, reader=None): + def __init__(self, search_dirs, locator=None, reader=None): if reader is None: reader = Reader() - if template_locator is None: - template_locator = TemplateLocator() + if locator is None: + locator = TemplateLocator() self.reader = reader self.search_dirs = search_dirs # TODO: rename this to locator. - self.template_locator = template_locator + self.template_locator = locator # TODO: make this private. def get_relative_template_location(self, view): diff --git a/tests/test_custom_template.py b/tests/test_custom_template.py index db6040d..c20e410 100644 --- a/tests/test_custom_template.py +++ b/tests/test_custom_template.py @@ -177,7 +177,7 @@ class LoaderTests(unittest.TestCase, AssertIsMixin): def test_init__locator(self): locator = Locator() - loader = Loader([], template_locator=locator) + loader = Loader([], locator=locator) self.assertIs(loader.template_locator, locator) |