'Test that cached_property caches its value,
and that it behaves like a property'

def test_cached_property(self):

    class A(object, ):
        @cached_property
        def value(self):
            return (1, object())
    a = A()
    self.assertEqual(a.value, a.value)
    self.assertEqual(a.value[0], 1)
    a2 = A()
    self.assertNotEqual(a.value, a2.value)
    self.assertIsInstance(A.value, cached_property)
