Fix templar unittests for change in preserve_trailing_newline parameter's default value

This commit is contained in:
Toshio Kuratomi 2015-09-02 11:58:01 -07:00
parent 1998eddf8d
commit 1b64702b9a

View file

@ -58,8 +58,9 @@ class TestTemplar(unittest.TestCase):
# test some basic templating # test some basic templating
self.assertEqual(templar.template("{{foo}}"), "bar") self.assertEqual(templar.template("{{foo}}"), "bar")
self.assertEqual(templar.template("{{foo}}\n"), "bar") self.assertEqual(templar.template("{{foo}}\n"), "bar\n")
self.assertEqual(templar.template("{{foo}}\n", preserve_trailing_newlines=True), "bar\n") self.assertEqual(templar.template("{{foo}}\n", preserve_trailing_newlines=True), "bar\n")
self.assertEqual(templar.template("{{foo}}\n", preserve_trailing_newlines=False), "bar")
self.assertEqual(templar.template("foo", convert_bare=True), "bar") self.assertEqual(templar.template("foo", convert_bare=True), "bar")
self.assertEqual(templar.template("{{bam}}"), "bar") self.assertEqual(templar.template("{{bam}}"), "bar")
self.assertEqual(templar.template("{{num}}"), 1) self.assertEqual(templar.template("{{num}}"), 1)