diff --git a/openstack_auth/tests/unit/test_auth.py b/openstack_auth/tests/unit/test_auth.py index a668f2a7f0..60a4a07862 100644 --- a/openstack_auth/tests/unit/test_auth.py +++ b/openstack_auth/tests/unit/test_auth.py @@ -376,7 +376,7 @@ class OpenStackAuthTestsV3(OpenStackAuthTestsMixin, def test_exception(self): user = self.data.user form_data = self.get_form_data(user) - exc = keystone_exceptions.ClientException(500) + exc = keystone_exceptions.ClientException('error 500') self._mock_client_password_auth_failure(user.name, user.password, exc) self.mox.ReplayAll() diff --git a/openstack_dashboard/api/keystone.py b/openstack_dashboard/api/keystone.py index af3d779ba5..d1600b2fec 100644 --- a/openstack_dashboard/api/keystone.py +++ b/openstack_dashboard/api/keystone.py @@ -440,7 +440,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: @@ -458,7 +458,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)