diff --git a/openstack_auth/tests/unit/test_auth.py b/openstack_auth/tests/unit/test_auth.py index bb663042ec..b87d2bfbfa 100644 --- a/openstack_auth/tests/unit/test_auth.py +++ b/openstack_auth/tests/unit/test_auth.py @@ -1055,7 +1055,8 @@ class OpenStackAuthTestsV3WithMock(test.TestCase): form_data = self.get_form_data(user) url = reverse('login') - mock_get_access.side_effect = keystone_exceptions.ClientException(500) + mock_get_access.side_effect = \ + keystone_exceptions.ClientException('error 500') # GET the page to set the test cookie. response = self.client.get(url, form_data) diff --git a/openstack_dashboard/api/keystone.py b/openstack_dashboard/api/keystone.py index 96d6dd455c..74691f0e8f 100644 --- a/openstack_dashboard/api/keystone.py +++ b/openstack_dashboard/api/keystone.py @@ -438,7 +438,7 @@ def user_update(request, user, **data): if not keystone_can_edit_user(): raise keystone_exceptions.ClientException( - 405, _("Identity service does not allow editing user data.")) + _("Identity service does not allow editing user data.")) try: user = manager.update(user, **data) except keystone_exceptions.Conflict: @@ -456,7 +456,7 @@ def user_update_password(request, user, password, admin=True): if not keystone_can_edit_user(): raise keystone_exceptions.ClientException( - 405, _("Identity service does not allow editing user password.")) + _("Identity service does not allow editing user password.")) manager = keystoneclient(request, admin=admin).users manager.update(user, password=password) diff --git a/openstack_dashboard/dashboards/identity/domains/tables.py b/openstack_dashboard/dashboards/identity/domains/tables.py index 8c0dbf725a..7fb879f96f 100644 --- a/openstack_dashboard/dashboards/identity/domains/tables.py +++ b/openstack_dashboard/dashboards/identity/domains/tables.py @@ -116,7 +116,7 @@ class DeleteDomainsAction(tables.DeleteAction): msg = _('Domain "%s" must be disabled before it can be deleted.') \ % domain.name messages.error(request, msg) - raise keystoneclient_exceptions.ClientException(409, msg) + raise keystoneclient_exceptions.ClientException(msg) else: LOG.info('Deleting domain "%s".', obj_id) api.keystone.domain_delete(request, obj_id)