From 2c0a005d3e59ba00587da7e041338fc20d0e30f3 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 1 Jan 2020 13:06:24 -0500 Subject: [PATCH] modify gapi error tests --- src/gapi/errors_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gapi/errors_test.py b/src/gapi/errors_test.py index 9b4a7066..4ec0c682 100644 --- a/src/gapi/errors_test.py +++ b/src/gapi/errors_test.py @@ -161,7 +161,7 @@ class ErrorsTest(unittest.TestCase): # This error does not have an "errors" key describing each error. content = {'error': {'code': status_code, 'message': 'unknown error'}} content_as_bytes = json.dumps(content).encode('UTF-8') - err = errors.googleapiclient.errors.HttpError(response, content_as_bytes) + err = googleapiclient.errors.HttpError(response, content_as_bytes) http_status, reason, message = errors.get_gapi_error_detail(err) self.assertEqual(http_status, status_code) @@ -175,7 +175,7 @@ class ErrorsTest(unittest.TestCase): # This error only has an error_description_field and an unknown description. content = {'error_description': 'something errored'} content_as_bytes = json.dumps(content).encode('UTF-8') - err = errors.googleapiclient.errors.HttpError(response, content_as_bytes) + err = googleapiclient.errors.HttpError(response, content_as_bytes) with self.assertRaises(SystemExit) as context: errors.get_gapi_error_detail(err) @@ -186,7 +186,7 @@ class ErrorsTest(unittest.TestCase): response = {'status': status_code} content = {'error_description': 'Invalid Value'} content_as_bytes = json.dumps(content).encode('UTF-8') - err = errors.googleapiclient.errors.HttpError(response, content_as_bytes) + err = googleapiclient.errors.HttpError(response, content_as_bytes) http_status, reason, message = errors.get_gapi_error_detail(err) self.assertEqual(http_status, status_code) @@ -198,7 +198,7 @@ class ErrorsTest(unittest.TestCase): response = {'status': status_code} content = {'notErrorContentThatIsExpected': 'foo'} content_as_bytes = json.dumps(content).encode('UTF-8') - err = errors.googleapiclient.errors.HttpError(response, content_as_bytes) + err = googleapiclient.errors.HttpError(response, content_as_bytes) with self.assertRaises(SystemExit) as context: errors.get_gapi_error_detail(err)