def test_detection(self): blob = "## template:cheetah" (template_type, renderer, contents) = templater.detect_template(blob) self.assertIn("cheetah", template_type) self.assertEqual("", contents.strip()) blob = "blahblah $blah" (template_type, renderer, contents) = templater.detect_template(blob) self.assertIn("cheetah", template_type) self.assertEquals(blob, contents) blob = '##template:something-new' self.assertRaises(ValueError, templater.detect_template, blob)
def test_detection(self): blob = "## template:cheetah" (template_type, renderer, contents) = templater.detect_template(blob) self.assertIn("cheetah", template_type) self.assertEqual("", contents.strip()) blob = "blahblah $blah" (template_type, renderer, contents) = templater.detect_template(blob) self.assertIn("cheetah", template_type) self.assertEqual(blob, contents) blob = "##template:something-new" self.assertRaises(ValueError, templater.detect_template, blob)