summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-03-24 14:56:16 -0700
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-03-24 14:56:16 -0700
commit3dbd4b9b9b990d55efd267c96fbd104f052847d8 (patch)
tree2501725090f7dca21565fff5bdc1b8c1ef103812
parent9b60fe6beb5053de7bfdc2e67451f151c71c361a (diff)
downloadpystache-3dbd4b9b9b990d55efd267c96fbd104f052847d8.tar.gz
Tweaks to the test_load__template__correct_reader() test.
-rw-r--r--tests/test_custom_template.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/test_custom_template.py b/tests/test_custom_template.py
index d67b5fc..02aabe4 100644
--- a/tests/test_custom_template.py
+++ b/tests/test_custom_template.py
@@ -224,10 +224,12 @@ class LoaderTests(unittest.TestCase, AssertIsMixin, AssertStringMixin):
def test_load__template__correct_reader(self):
"""
- Test that reader.unicode() is called with the correct arguments.
+ Test that reader.unicode() is called correctly.
- This test is a catch-all for the template attribute in addition to
- the other test cases.
+ This test tests that the correct reader is called with the correct
+ arguments. This is a catch-all test to supplement the other
+ test cases. It tests Loader.load() independent of reader.unicode()
+ being implemented correctly (and tested).
"""
class TestReader(Reader):
@@ -242,7 +244,8 @@ class LoaderTests(unittest.TestCase, AssertIsMixin, AssertStringMixin):
return u"foo"
reader = TestReader()
- loader = Loader(reader=reader)
+ loader = Loader()
+ loader.reader = reader
custom = Template()
custom.template = "template-foo"