'Test form view Create, Edit, Delete button visibility based on access right of model'

def test_view_create_edit_button_visibility(self):

    self.erp_system_group.users += self.demo_user
    methods = ['create', 'edit', 'delete']
    company = self.env['res.company'].sudo(self.demo_user)
    company_view = company.fields_view_get(False, 'form')
    view_arch = etree.fromstring(company_view['arch'])
    for method in methods:
        self.assertIsNone(view_arch.get(method))
