-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Properly encode image content. #2528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly encode image content. #2528
Conversation
| image_request = client.connection._requested[0]['data']['requests'][0] | ||
| # json_dump = json.dumps(image_request['image']['content']) | ||
| # self.assertEqual(json_dump, self.B64_IMAGE_CONTENT) | ||
|
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
vision/unit_tests/test_client.py
Outdated
| class TestClient(unittest.TestCase): | ||
| import base64 | ||
| from google.cloud._helpers import _to_bytes | ||
| from google.cloud._helpers import _bytes_to_unicode |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@tseaver, I moved the imports and constants for the other test I updated for this. LMKWYT |
e85c772 to
0e992eb
Compare
…2525 Properly encode image content.
Image content was not being properly encoded before being JSON serialized for the request.
Fixes #2525.