Change tempest Unauthorized exc to tempest-lib exc
This commit changes tempest.exceptions.Unauthorized to
tempest_lib.exceptions.Unauthorized. This is one of the migrating rest
client to tempest-lib works.
Change-Id: I7675700b53ddedc2deee024c6e1ab3c88e0e3683
diff --git a/tempest/services/identity/json/token_client.py b/tempest/services/identity/json/token_client.py
index 93936bc..1e8b31e 100644
--- a/tempest/services/identity/json/token_client.py
+++ b/tempest/services/identity/json/token_client.py
@@ -13,6 +13,7 @@
# under the License.
import json
+from tempest_lib import exceptions as lib_exc
from tempest.common import service_client
from tempest import config
@@ -87,7 +88,7 @@
if resp.status in [401, 403]:
resp_body = json.loads(resp_body)
- raise exceptions.Unauthorized(resp_body['error']['message'])
+ raise lib_exc.Unauthorized(resp_body['error']['message'])
elif resp.status not in [200, 201]:
raise exceptions.IdentityError(
'Unexpected status code {0}'.format(resp.status))