'Check method one().'

@mute_logger('odoo.models')
def test_70_one(self):

    ps = self.env['res.partner'].search([('name', 'ilike', 'a')])
    self.assertTrue((len(ps) > 1))
    with self.assertRaises(ValueError):
        ps.ensure_one()
    p1 = ps[0]
    self.assertEqual(len(p1), 1)
    self.assertEqual(p1.ensure_one(), p1)
    p0 = self.env['res.partner'].browse()
    self.assertEqual(len(p0), 0)
    with self.assertRaises(ValueError):
        p0.ensure_one()
