'test related fields with a single field in the path.'

def test_25_related_single(self):

    record = self.env['test_new_api.related'].create({'name': 'A'})
    self.assertEqual(record.related_name, record.name)
    self.assertEqual(record.related_related_name, record.name)
    records0 = record.search([('name', '=', 'A')])
    self.assertIn(record, records0)
    records1 = record.search([('related_name', '=', 'A')])
    self.assertEqual(records1, records0)
    records2 = record.search([('related_related_name', '=', 'A')])
    self.assertEqual(records2, records0)
    record.write({'related_name': 'B'})
    self.assertEqual(record.name, 'B')
    record.write({'related_related_name': 'C'})
    self.assertEqual(record.name, 'C')
