'test whether a model extension is visible in its children models.'

def test_extend_parent(self):

    parent = self.env['test.inherit.parent']
    child = self.env['test.inherit.child']
    self.assertIn('foo', parent.fields_get())
    self.assertNotIn('bar', parent.fields_get())
    self.assertIn('foo', child.fields_get())
    self.assertIn('bar', child.fields_get())
    self.assertEqual(parent.stuff(), 'P1P2')
    self.assertEqual(child.stuff(), 'P1P2C1')
    self.assertEqual(parent._table, 'test_inherit_parent')
    self.assertEqual(child._table, 'test_inherit_child')
    self.assertEqual(len(parent._sql_constraints), 1)
    self.assertEqual(len(child._sql_constraints), 1)
    self.assertEqual(len(parent._constraint_methods), 1)
    self.assertEqual(len(child._constraint_methods), 1)
