diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-04-01 10:02:47 -0700 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-04-01 10:02:47 -0700 |
commit | aabb1c6bb2137ab8ad8be9702f2bf9e0d75b7343 (patch) | |
tree | caa725a24a1b54fab78c6afa0607546823e3035a /tests | |
parent | ed896eb91003237c3fad562bfe6bf32ef7bb2414 (diff) | |
download | pystache-aabb1c6bb2137ab8ad8be9702f2bf9e0d75b7343.tar.gz |
Rename SpecLoader method to _find_relative().
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_template_spec.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/test_template_spec.py b/tests/test_template_spec.py index 6c26d14..cbf61c4 100644 --- a/tests/test_template_spec.py +++ b/tests/test_template_spec.py @@ -265,38 +265,38 @@ class TemplateSpecTests(unittest.TestCase): def _assert_template_location(self, view, expected): locator = self._make_locator() - actual = locator.get_relative_template_location(view) + actual = locator._find_relative(view) self.assertEquals(actual, expected) - def test_get_relative_template_location(self): + def test_find_relative(self): """ - Test get_relative_template_location(): default behavior (no attributes set). + Test _find_relative(): default behavior (no attributes set). """ view = SampleView() self._assert_template_location(view, (None, 'sample_view.mustache')) - def test_get_relative_template_location__template_rel_path__file_name_only(self): + def test_find_relative__template_rel_path__file_name_only(self): """ - Test get_relative_template_location(): template_rel_path attribute. + Test _find_relative(): template_rel_path attribute. """ view = SampleView() view.template_rel_path = 'template.txt' self._assert_template_location(view, ('', 'template.txt')) - def test_get_relative_template_location__template_rel_path__file_name_with_directory(self): + def test_find_relative__template_rel_path__file_name_with_directory(self): """ - Test get_relative_template_location(): template_rel_path attribute. + Test _find_relative(): template_rel_path attribute. """ view = SampleView() view.template_rel_path = 'foo/bar/template.txt' self._assert_template_location(view, ('foo/bar', 'template.txt')) - def test_get_relative_template_location__template_rel_directory(self): + def test_find_relative__template_rel_directory(self): """ - Test get_relative_template_location(): template_rel_directory attribute. + Test _find_relative(): template_rel_directory attribute. """ view = SampleView() @@ -304,18 +304,18 @@ class TemplateSpecTests(unittest.TestCase): self._assert_template_location(view, ('foo', 'sample_view.mustache')) - def test_get_relative_template_location__template_name(self): + def test_find_relative__template_name(self): """ - Test get_relative_template_location(): template_name attribute. + Test _find_relative(): template_name attribute. """ view = SampleView() view.template_name = 'new_name' self._assert_template_location(view, (None, 'new_name.mustache')) - def test_get_relative_template_location__template_extension(self): + def test_find_relative__template_extension(self): """ - Test get_relative_template_location(): template_extension attribute. + Test _find_relative(): template_extension attribute. """ view = SampleView() @@ -331,7 +331,7 @@ class TemplateSpecTests(unittest.TestCase): view = SampleView() view.template_rel_path = 'foo/bar.txt' - self.assertTrue(locator.get_relative_template_location(view)[0] is not None) + self.assertTrue(locator._find_relative(view)[0] is not None) actual = locator._find(view) expected = os.path.abspath(os.path.join(DATA_DIR, 'foo/bar.txt')) @@ -346,7 +346,7 @@ class TemplateSpecTests(unittest.TestCase): locator = self._make_locator() view = SampleView() - self.assertTrue(locator.get_relative_template_location(view)[0] is None) + self.assertTrue(locator._find_relative(view)[0] is None) actual = locator._find(view) expected = os.path.abspath(os.path.join(DATA_DIR, 'sample_view.mustache')) |