'Check behavior of null instances.'

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

    partner = self.env['res.partner'].search([('parent_id', '=', False)])[0]
    self.assertTrue(partner)
    self.assertIsRecord(partner, 'res.partner')
    self.assertFalse(partner.parent_id)
    self.assertIsNull(partner.parent_id, 'res.partner')
    self.assertIs(partner.parent_id.id, False)
    self.assertFalse(partner.parent_id.user_id)
    self.assertIsNull(partner.parent_id.user_id, 'res.users')
    self.assertIs(partner.parent_id.user_id.name, False)
    self.assertFalse(partner.parent_id.user_id.groups_id)
    self.assertIsRecordset(partner.parent_id.user_id.groups_id, 'res.groups')
