| --- gsutil.orig/gslib/vendored/boto/tests/integration/s3/mock_storage_service.py 2020-04-10 13:26:12.000000000 -0700 |
| +++ gsutil/gslib/vendored/boto/tests/integration/s3/mock_storage_service.py 2020-05-07 11:11:14.971631528 -0700 |
| @@ -30,13 +30,11 @@ |
| import boto |
| import base64 |
| import re |
| -import six |
| from hashlib import md5 |
| |
| from boto.utils import compute_md5 |
| from boto.utils import find_matching_headers |
| from boto.utils import merge_headers_by_name |
| -from boto.utils import write_to_fd |
| from boto.s3.prefix import Prefix |
| -from boto.compat import six |
| +import six |
| |
| @@ -90,14 +88,12 @@ |
| torrent=NOT_IMPL, |
| version_id=NOT_IMPL, |
| res_download_handler=NOT_IMPL): |
| - data = six.ensure_binary(self.data) |
| - write_to_fd(fp, data) |
| + fp.write(six.ensure_str(self.data, errors='replace')) |
| |
| def get_file(self, fp, headers=NOT_IMPL, cb=NOT_IMPL, num_cb=NOT_IMPL, |
| torrent=NOT_IMPL, version_id=NOT_IMPL, |
| override_num_retries=NOT_IMPL): |
| - data = six.ensure_binary(self.data) |
| - write_to_fd(fp, data) |
| + fp.write(self.data) |
| |
| def _handle_headers(self, headers): |
| if not headers: |
| @@ -284,9 +280,6 @@ |
| else: |
| return '<Subresource/>' |
| |
| - def get_tags(self): |
| - return [] |
| - |
| def new_key(self, key_name=None): |
| mock_key = MockKey(self, key_name) |
| self.keys[key_name] = mock_key |