def METHOD_NAME(self):
    s = Template('$who likes ${what} for ${meal}')
    d = dict(who='tim', what='ham', meal='dinner')
    self.assertEqual(s.substitute(d), 'tim likes ham for dinner')
    self.assertRaises(KeyError, s.substitute,
                      dict(who='tim', what='ham'))