def test_firstmethod_handles_lazy(self):

    class A(object):

        def __init__(self, value=None):
            self.value = value

        def m(self):
            return self.value
    self.assertEqual('four', firstmethod('m')([A(), A(), A(), A('four'), A('five')]))
    self.assertEqual('four', firstmethod('m')([A(), A(), A(), lazy((lambda : A('four'))), A('five')]))
def test_firstmethod_handles_lazy(self):

    class A(object):

        def __init__(self, value=None):
            self.value = value

        def m(self):
            return self.value
    self.assertEqual('four', firstmethod('m')([A(), A(), A(), A('four'), A('five')]))
    self.assertEqual('four', firstmethod('m')([A(), A(), A(), lazy((lambda : A('four'))), A('five')]))