def METHOD_NAME(self):
    class CallFormatter(string.Formatter):
        def format_field(self, value, format_spec):
            return format(value(), format_spec)
    fmt = CallFormatter()
    self.assertEqual(fmt.format('*{0}*', lambda : 'result'), '*result*')