HemangChothani: @frand still we can refactor, need your suggestion.

-  We can remove [_get_transport_method()](https://github.com/googleapis/python-storage/blob/cecc7ac95a00ab1437a24bee44f8b6c5b8a7189d/google/cloud/storage/blob.py#L638) from blob class as we are calling [_require_client()](https://github.com/googleapis/python-storage/pull/107/files#diff-5d3277a5f0f072a447a1eb89f9fa1ae0R796) method just above  _get_transport_method() call, so no need of that method and we can also directly pass client._http.

OR

- We can modify return type of [_get_transport_method](https://github.com/googleapis/python-storage/blob/cecc7ac95a00ab1437a24bee44f8b6c5b8a7189d/google/cloud/storage/blob.py#L638) method, as of now it returns transport object but also need to return client object as well, so no need to call [_require_client()](https://github.com/googleapis/python-storage/pull/107/files#diff-5d3277a5f0f072a447a1eb89f9fa1ae0R796) in the respective method where we are using `*_URL_TEMPLATE` global variables. 
frankyn: @HemangChothani asked @crwilcox to take another pass to confirm.
diff --git a/google/cloud/storage/blob.py b/google/cloud/storage/blob.py
index 4200c9d..d341661 100644
--- a/google/cloud/storage/blob.py
+++ b/google/cloud/storage/blob.py
@@ -54,7 +54,6 @@ from google.cloud._helpers import _bytes_to_unicode
 from google.cloud._helpers import _rfc3339_to_datetime
 from google.cloud._helpers import _to_bytes
 from google.cloud.exceptions import NotFound
-from google.cloud.storage._helpers import _get_storage_host
 from google.cloud.storage._helpers import _PropertyMixin
 from google.cloud.storage._helpers import _scalar_property
 from google.cloud.storage._helpers import _convert_to_timestamp
@@ -70,12 +69,11 @@ from google.cloud.storage.constants import NEARLINE_STORAGE_CLASS
 from google.cloud.storage.constants import REGIONAL_LEGACY_STORAGE_CLASS
 from google.cloud.storage.constants import STANDARD_STORAGE_CLASS
 
-_STORAGE_HOST = _get_storage_host()
 
 _API_ACCESS_ENDPOINT = "https://storage.googleapis.com"
 _DEFAULT_CONTENT_TYPE = u"application/octet-stream"
-_DOWNLOAD_URL_TEMPLATE = _STORAGE_HOST + u"/download/storage/v1{path}?alt=media"
-_BASE_UPLOAD_TEMPLATE = _STORAGE_HOST + u"/upload/storage/v1{bucket_path}/o?uploadType="
+_DOWNLOAD_URL_TEMPLATE = u"{hostname}/download/storage/v1{path}?alt=media"
+_BASE_UPLOAD_TEMPLATE = u"{hostname}/upload/storage/v1{bucket_path}/o?uploadType="
 _MULTIPART_URL_TEMPLATE = _BASE_UPLOAD_TEMPLATE + u"multipart"
 _RESUMABLE_URL_TEMPLATE = _BASE_UPLOAD_TEMPLATE + u"resumable"
 # NOTE: "acl" is also writeable but we defer ACL management to
@@ -650,19 +648,24 @@ class Blob(_PropertyMixin):
         client = self._require_client(client)
         return client._http
 
-    def _get_download_url(self):
+    def _get_download_url(self, client):
         """Get the download URL for the current blob.
 
         If the ``media_link`` has been loaded, it will be used, otherwise
         the URL will be constructed from the current blob's path (and possibly
         generation) to avoid a round trip.
 
+        :type client: :class:`~google.cloud.storage.client.Client`
+        :param client: The client to use.
+
         :rtype: str
         :returns: The download URL for the current blob.
         """
         name_value_pairs = []
         if self.media_link is None:
-            base_url = _DOWNLOAD_URL_TEMPLATE.format(path=self.path)
+            base_url = _DOWNLOAD_URL_TEMPLATE.format(
+                hostname=client._connection.API_BASE_URL, path=self.path
+            )
             if self.generation is not None:
                 name_value_pairs.append(("generation", "{:d}".format(self.generation)))
         else:
@@ -790,7 +793,8 @@ class Blob(_PropertyMixin):
 
         :raises: :class:`google.cloud.exceptions.NotFound`
         """
-        download_url = self._get_download_url()
+        client = self._require_client(client)
+        download_url = self._get_download_url(client)
         headers = _get_encryption_headers(self._encryption_key)
         headers["accept-encoding"] = "gzip"
 
@@ -1055,7 +1059,9 @@ class Blob(_PropertyMixin):
         info = self._get_upload_arguments(content_type)
         headers, object_metadata, content_type = info
 
-        base_url = _MULTIPART_URL_TEMPLATE.format(bucket_path=self.bucket.path)
+        base_url = _MULTIPART_URL_TEMPLATE.format(
+            hostname=self.client._connection.API_BASE_URL, bucket_path=self.bucket.path
+        )
         name_value_pairs = []
 
         if self.user_project is not None:
@@ -1190,7 +1196,9 @@ class Blob(_PropertyMixin):
         if extra_headers is not None:
             headers.update(extra_headers)
 
-        base_url = _RESUMABLE_URL_TEMPLATE.format(bucket_path=self.bucket.path)
+        base_url = _RESUMABLE_URL_TEMPLATE.format(
+            hostname=self.client._connection.API_BASE_URL, bucket_path=self.bucket.path
+        )
         name_value_pairs = []
 
         if self.user_project is not None:

"Anonymous credentials cannot be refreshed" with fake-gcs-server
  - OS type and version: Ubuntu 18.04
  - Python version: 3.7.6
  - pip version: 20.0.2
  - `google-cloud-storage` version: 1.27.0

I'm trying to use [fake-gcs-server](https://github.com/fsouza/fake-gcs-server) for local GCS testing.

Basic client setup works fine:
```python
>>> creds = AnonymousCredentials() 
>>> options = ClientOptions(api_endpoint="http://127.0.0.1:4443") 
>>> client = gcs.Client(credentials=creds, client_options=options, project='') 
```

I can list buckets and blobs:
```python
>>> print(list(client.list_buckets()))                                                                                                                                      
[<Bucket: bucket1>, <Bucket: bucket2>]
>>> print(list(client.list_blobs('bucket1')))                                                                                                                               
[<Blob: bucket1, hello.txt, 1586453246295809>,
 <Blob: bucket1, subdir/toto.txt, 1586453246295810>]
>>> a, b = client.list_blobs('bucket1')                                                                                                                                     
>>> a.size                                                                                                                                                                  
548
>>> a.name                                                                                                                                                                  
'hello.txt'
>>> a.id                                                                                                                                                                    
'bucket1/hello.txt'
```

`fake-gcs-server` doesn't need any credentials, so reading the file should just work. But for some reason it doesn't:
```python
>>> a.download_as_string()                                                                                                                                                  
Traceback (most recent call last):
  File "<ipython-input-19-72ec41b6efbf>", line 1, in <module>
    a.download_as_string()
  File "/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/cloud/storage/blob.py", line 879, in download_as_string
    raw_download=raw_download,
  File "/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/cloud/storage/blob.py", line 796, in download_to_file
    transport, file_obj, download_url, headers, start, end, raw_download
  File "/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/cloud/storage/blob.py", line 720, in _do_download
    download.consume(transport)
  File "/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/resumable_media/requests/download.py", line 151, in consume
    result = _helpers.http_request(transport, method, url, **request_kwargs)
  File "/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/resumable_media/requests/_helpers.py", line 136, in http_request
    return _helpers.wait_and_retry(func, RequestsMixin._get_status_code, retry_strategy)
  File "/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/resumable_media/_helpers.py", line 150, in wait_and_retry
    response = func()
  File "/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/auth/transport/requests.py", line 482, in request
    self.credentials.refresh(auth_request)
  File "/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/site-packages/google/auth/credentials.py", line 148, in refresh
    raise ValueError("Anonymous credentials cannot be refreshed.")
ValueError: Anonymous credentials cannot be refreshed.
```

diff --git a/tests/unit/test_blob.py b/tests/unit/test_blob.py
index 4ae0e21..bb1aa11 100644
--- a/tests/unit/test_blob.py
+++ b/tests/unit/test_blob.py
@@ -751,7 +751,10 @@ class Test_Blob(unittest.TestCase):
         # Set the media link on the blob
         blob._properties["mediaLink"] = media_link
 
-        download_url = blob._get_download_url()
+        client = mock.Mock(_connection=_Connection)
+        client._connection.API_BASE_URL = "https://storage.googleapis.com"
+        download_url = blob._get_download_url(client)
+
         self.assertEqual(download_url, media_link)
 
     def test__get_download_url_with_media_link_w_user_project(self):
@@ -763,7 +766,10 @@ class Test_Blob(unittest.TestCase):
         # Set the media link on the blob
         blob._properties["mediaLink"] = media_link
 
-        download_url = blob._get_download_url()
+        client = mock.Mock(_connection=_Connection)
+        client._connection.API_BASE_URL = "https://storage.googleapis.com"
+        download_url = blob._get_download_url(client)
+
         self.assertEqual(
             download_url, "{}?userProject={}".format(media_link, user_project)
         )
@@ -774,7 +780,9 @@ class Test_Blob(unittest.TestCase):
         blob = self._make_one(blob_name, bucket=bucket)
 
         self.assertIsNone(blob.media_link)
-        download_url = blob._get_download_url()
+        client = mock.Mock(_connection=_Connection)
+        client._connection.API_BASE_URL = "https://storage.googleapis.com"
+        download_url = blob._get_download_url(client)
         expected_url = (
             "https://storage.googleapis.com/download/storage/v1/b/"
             "buhkit/o/bzzz-fly.txt?alt=media"
@@ -790,7 +798,9 @@ class Test_Blob(unittest.TestCase):
         blob._properties["generation"] = str(generation)
 
         self.assertIsNone(blob.media_link)
-        download_url = blob._get_download_url()
+        client = mock.Mock(_connection=_Connection)
+        client._connection.API_BASE_URL = "https://storage.googleapis.com"
+        download_url = blob._get_download_url(client)
         expected_url = (
             "https://storage.googleapis.com/download/storage/v1/b/"
             "fictional/o/pretend.txt?alt=media&generation=1493058489532987"
@@ -804,7 +814,9 @@ class Test_Blob(unittest.TestCase):
         blob = self._make_one(blob_name, bucket=bucket)
 
         self.assertIsNone(blob.media_link)
-        download_url = blob._get_download_url()
+        client = mock.Mock(_connection=_Connection)
+        client._connection.API_BASE_URL = "https://storage.googleapis.com"
+        download_url = blob._get_download_url(client)
         expected_url = (
             "https://storage.googleapis.com/download/storage/v1/b/"
             "fictional/o/pretend.txt?alt=media&userProject={}".format(user_project)
@@ -823,7 +835,9 @@ class Test_Blob(unittest.TestCase):
         blob = self._make_one(blob_name, bucket=bucket, kms_key_name=kms_resource)
 
         self.assertIsNone(blob.media_link)
-        download_url = blob._get_download_url()
+        client = mock.Mock(_connection=_Connection)
+        client._connection.API_BASE_URL = "https://storage.googleapis.com"
+        download_url = blob._get_download_url(client)
         expected_url = (
             "https://storage.googleapis.com/download/storage/v1/b/"
             "buhkit/o/bzzz-fly.txt?alt=media"
@@ -1003,7 +1017,8 @@ class Test_Blob(unittest.TestCase):
 
     def test_download_to_file_wo_media_link(self):
         blob_name = "blob-name"
-        client = mock.Mock(spec=[u"_http"])
+        client = mock.Mock(_connection=_Connection, spec=[u"_http"])
+        client._connection.API_BASE_URL = "https://storage.googleapis.com"
         bucket = _Bucket(client)
         blob = self._make_one(blob_name, bucket=bucket)
         blob._do_download = mock.Mock()
@@ -1319,7 +1334,8 @@ class Test_Blob(unittest.TestCase):
         transport = self._mock_transport(http_client.OK, {})
 
         # Create some mock arguments.
-        client = mock.Mock(_http=transport, spec=["_http"])
+        client = mock.Mock(_http=transport, _connection=_Connection, spec=["_http"])
+        client._connection.API_BASE_URL = "https://storage.googleapis.com"
         data = b"data here hear hier"
         stream = io.BytesIO(data)
         content_type = u"application/xml"
@@ -1485,7 +1501,8 @@ class Test_Blob(unittest.TestCase):
         transport = self._mock_transport(http_client.OK, response_headers)
 
         # Create some mock arguments and call the method under test.
-        client = mock.Mock(_http=transport, spec=[u"_http"])
+        client = mock.Mock(_http=transport, _connection=_Connection, spec=[u"_http"])
+        client._connection.API_BASE_URL = "https://storage.googleapis.com"
         data = b"hello hallo halo hi-low"
         stream = io.BytesIO(data)
         content_type = u"text/plain"
@@ -1772,7 +1789,8 @@ class Test_Blob(unittest.TestCase):
         )
 
         # Create some mock arguments and call the method under test.
-        client = mock.Mock(_http=transport, spec=["_http"])
+        client = mock.Mock(_http=transport, _connection=_Connection, spec=["_http"])
+        client._connection.API_BASE_URL = "https://storage.googleapis.com"
         stream = io.BytesIO(data)
         content_type = u"text/html"
         response = blob._do_resumable_upload(
@@ -2114,7 +2132,8 @@ class Test_Blob(unittest.TestCase):
         # Create some mock arguments and call the method under test.
         content_type = u"text/plain"
         size = 10000
-        client = mock.Mock(_http=transport, spec=[u"_http"])
+        client = mock.Mock(_http=transport, _connection=_Connection, spec=[u"_http"])
+        client._connection.API_BASE_URL = "https://storage.googleapis.com"
         new_url = blob.create_resumable_upload_session(
             content_type=content_type, size=size, origin=origin, client=client
         )
diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py
index 63eeb37..c3a3935 100644
--- a/tests/unit/test_client.py
+++ b/tests/unit/test_client.py
@@ -137,18 +137,16 @@ class TestClient(unittest.TestCase):
         )
 
     def test_ctor_w_client_options_dict(self):
-
         PROJECT = "PROJECT"
         credentials = _make_credentials()
-        client_options = {"api_endpoint": "https://www.foo-googleapis.com"}
+        api_endpoint = "https://www.foo-googleapis.com"
+        client_options = {"api_endpoint": api_endpoint}
 
         client = self._make_one(
             project=PROJECT, credentials=credentials, client_options=client_options
         )
 
-        self.assertEqual(
-            client._connection.API_BASE_URL, "https://www.foo-googleapis.com"
-        )
+        self.assertEqual(client._connection.API_BASE_URL, api_endpoint)
 
     def test_ctor_w_client_options_object(self):
         from google.api_core.client_options import ClientOptions

pip install -e .
parse_log_pytest
pytest
pytest pytest-cov mock
3.8
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
cachetools==4.2.4
certifi==2025.1.31
charset-normalizer==3.4.1
coverage==7.6.1
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
google-api-core==2.10.2
google-auth==1.35.0
google-cloud-core==1.7.3
-e git+https://github.com/googleapis/python-storage.git@69b2c45079ce2c86f7847fdc9611a9462ae28678#egg=google_cloud_storage
google-resumable-media==0.5.1
googleapis-common-protos==1.69.2
idna==3.10
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
mock==5.2.0
packaging @ file:///croot/packaging_1720101850331/work
pluggy @ file:///tmp/build/80754af9/pluggy_1648042571233/work
protobuf==4.25.6
pyasn1==0.6.1
pyasn1_modules==0.4.2
pytest @ file:///croot/pytest_1717793244625/work
pytest-cov==5.0.0
requests==2.32.3
rsa==4.9
six==1.17.0
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
urllib3==2.2.3

name: python-storage
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py38h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.1=py38h06a4308_0
  - pip=24.2=py38h06a4308_0
  - pluggy=1.0.0=py38h06a4308_1
  - pytest=7.4.4=py38h06a4308_0
  - python=3.8.20=he870216_0
  - readline=8.2=h5eee18b_0
  - setuptools=75.1.0=py38h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py38h06a4308_0
  - wheel=0.44.0=py38h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - cachetools==4.2.4
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - coverage==7.6.1
      - google-api-core==2.10.2
      - google-auth==1.35.0
      - google-cloud-core==1.7.3
      - google-resumable-media==0.5.1
      - googleapis-common-protos==1.69.2
      - idna==3.10
      - mock==5.2.0
      - protobuf==4.25.6
      - pyasn1==0.6.1
      - pyasn1-modules==0.4.2
      - pytest-cov==5.0.0
      - requests==2.32.3
      - rsa==4.9
      - six==1.17.0
      - urllib3==2.2.3
prefix: /opt/conda/envs/python-storage

tests/unit/test_blob.py::Test_Blob::test__get_download_url_on_the_fly tests/unit/test_blob.py::Test_Blob::test__get_download_url_on_the_fly_with_generation tests/unit/test_blob.py::Test_Blob::test__get_download_url_on_the_fly_with_kms_key_name tests/unit/test_blob.py::Test_Blob::test__get_download_url_on_the_fly_with_user_project tests/unit/test_blob.py::Test_Blob::test__get_download_url_with_media_link tests/unit/test_blob.py::Test_Blob::test__get_download_url_with_media_link_w_user_project
tests/unit/test_client.py::TestClient::test_create_bucket_w_explicit_project tests/unit/test_client.py::TestClient::test_create_bucket_w_object_success tests/unit/test_client.py::TestClient::test_create_bucket_w_string_success tests/unit/test_client.py::TestClient::test_create_hit tests/unit/test_client.py::TestClient::test_create_hmac_key_defaults tests/unit/test_client.py::TestClient::test_create_hmac_key_explicit_project tests/unit/test_client.py::TestClient::test_create_hmac_key_user_project tests/unit/test_client.py::TestClient::test_create_requester_pays_deprecated tests/unit/test_client.py::TestClient::test_create_w_extra_properties tests/unit/test_client.py::TestClient::test_get_bucket_with_object_hit tests/unit/test_client.py::TestClient::test_get_bucket_with_object_miss tests/unit/test_client.py::TestClient::test_get_bucket_with_string_hit tests/unit/test_client.py::TestClient::test_get_bucket_with_string_miss tests/unit/test_client.py::TestClient::test_get_hmac_key_metadata_w_project tests/unit/test_client.py::TestClient::test_get_hmac_key_metadata_wo_project tests/unit/test_client.py::TestClient::test_get_service_account_email_w_project tests/unit/test_client.py::TestClient::test_get_service_account_email_wo_project tests/unit/test_client.py::TestClient::test_get_signed_policy_v4 tests/unit/test_client.py::TestClient::test_get_signed_policy_v4_bucket_bound_hostname tests/unit/test_client.py::TestClient::test_get_signed_policy_v4_bucket_bound_hostname_with_scheme tests/unit/test_client.py::TestClient::test_get_signed_policy_v4_no_expiration tests/unit/test_client.py::TestClient::test_get_signed_policy_v4_virtual_hosted_style tests/unit/test_client.py::TestClient::test_get_signed_policy_v4_with_access_token tests/unit/test_client.py::TestClient::test_get_signed_policy_v4_with_fields tests/unit/test_client.py::TestClient::test_list_buckets_all_arguments tests/unit/test_client.py::TestClient::test_list_buckets_empty tests/unit/test_client.py::TestClient::test_list_buckets_explicit_project tests/unit/test_client.py::TestClient::test_list_hmac_keys_defaults_empty tests/unit/test_client.py::TestClient::test_list_hmac_keys_explicit_non_empty tests/unit/test_client.py::TestClient::test_lookup_bucket_hit tests/unit/test_client.py::TestClient::test_lookup_bucket_miss
tests/unit/test_blob.py::Test_Blob::test__do_download_w_chunks_w_range_w_raw tests/unit/test_blob.py::Test_Blob::test__do_download_w_chunks_w_range_wo_raw tests/unit/test_blob.py::Test_Blob::test__do_download_w_chunks_wo_range_w_raw tests/unit/test_blob.py::Test_Blob::test__do_download_w_chunks_wo_range_wo_raw tests/unit/test_blob.py::Test_Blob::test__do_download_wo_chunks_w_range_w_raw tests/unit/test_blob.py::Test_Blob::test__do_download_wo_chunks_w_range_wo_raw tests/unit/test_blob.py::Test_Blob::test__do_download_wo_chunks_wo_range_w_raw tests/unit/test_blob.py::Test_Blob::test__do_download_wo_chunks_wo_range_wo_raw tests/unit/test_blob.py::Test_Blob::test__do_multipart_upload_bad_size tests/unit/test_blob.py::Test_Blob::test__do_multipart_upload_no_size tests/unit/test_blob.py::Test_Blob::test__do_multipart_upload_with_generation_match tests/unit/test_blob.py::Test_Blob::test__do_multipart_upload_with_generation_not_match tests/unit/test_blob.py::Test_Blob::test__do_multipart_upload_with_kms tests/unit/test_blob.py::Test_Blob::test__do_multipart_upload_with_retry tests/unit/test_blob.py::Test_Blob::test__do_multipart_upload_with_size tests/unit/test_blob.py::Test_Blob::test__do_multipart_upload_with_user_project tests/unit/test_blob.py::Test_Blob::test__do_resumable_upload_no_size tests/unit/test_blob.py::Test_Blob::test__do_resumable_upload_with_predefined_acl tests/unit/test_blob.py::Test_Blob::test__do_resumable_upload_with_retry tests/unit/test_blob.py::Test_Blob::test__do_resumable_upload_with_size tests/unit/test_blob.py::Test_Blob::test__do_upload_uses_multipart tests/unit/test_blob.py::Test_Blob::test__do_upload_uses_resumable tests/unit/test_blob.py::Test_Blob::test__do_upload_with_retry tests/unit/test_blob.py::Test_Blob::test__encryption_headers_w_encryption_key tests/unit/test_blob.py::Test_Blob::test__encryption_headers_wo_encryption_key tests/unit/test_blob.py::Test_Blob::test__get_content_type_default tests/unit/test_blob.py::Test_Blob::test__get_content_type_explicit tests/unit/test_blob.py::Test_Blob::test__get_content_type_from_blob tests/unit/test_blob.py::Test_Blob::test__get_content_type_from_filename tests/unit/test_blob.py::Test_Blob::test__get_transport tests/unit/test_blob.py::Test_Blob::test__get_upload_arguments tests/unit/test_blob.py::Test_Blob::test__get_writable_metadata_no_changes tests/unit/test_blob.py::Test_Blob::test__get_writable_metadata_unwritable_field tests/unit/test_blob.py::Test_Blob::test__get_writable_metadata_with_changes tests/unit/test_blob.py::Test_Blob::test__initiate_resumable_upload_no_size tests/unit/test_blob.py::Test_Blob::test__initiate_resumable_upload_with_chunk_size tests/unit/test_blob.py::Test_Blob::test__initiate_resumable_upload_with_extra_headers tests/unit/test_blob.py::Test_Blob::test__initiate_resumable_upload_with_generation_match tests/unit/test_blob.py::Test_Blob::test__initiate_resumable_upload_with_generation_not_match tests/unit/test_blob.py::Test_Blob::test__initiate_resumable_upload_with_kms tests/unit/test_blob.py::Test_Blob::test__initiate_resumable_upload_with_predefined_acl tests/unit/test_blob.py::Test_Blob::test__initiate_resumable_upload_with_retry tests/unit/test_blob.py::Test_Blob::test__initiate_resumable_upload_with_size tests/unit/test_blob.py::Test_Blob::test__initiate_resumable_upload_with_user_project tests/unit/test_blob.py::Test_Blob::test__initiate_resumable_upload_without_chunk_size tests/unit/test_blob.py::Test_Blob::test__query_params_default tests/unit/test_blob.py::Test_Blob::test__query_params_w_generation tests/unit/test_blob.py::Test_Blob::test__query_params_w_user_project tests/unit/test_blob.py::Test_Blob::test__set_metadata_to_none tests/unit/test_blob.py::Test_Blob::test__set_properties_w_kms_key_name tests/unit/test_blob.py::Test_Blob::test__set_properties_wo_kms_key_name tests/unit/test_blob.py::Test_Blob::test_acl_property tests/unit/test_blob.py::Test_Blob::test_bucket_readonly_property tests/unit/test_blob.py::Test_Blob::test_cache_control_getter tests/unit/test_blob.py::Test_Blob::test_cache_control_setter tests/unit/test_blob.py::Test_Blob::test_chunk_size_ctor tests/unit/test_blob.py::Test_Blob::test_chunk_size_getter tests/unit/test_blob.py::Test_Blob::test_chunk_size_setter tests/unit/test_blob.py::Test_Blob::test_chunk_size_setter_bad_value tests/unit/test_blob.py::Test_Blob::test_client tests/unit/test_blob.py::Test_Blob::test_component_count tests/unit/test_blob.py::Test_Blob::test_component_count_string_val tests/unit/test_blob.py::Test_Blob::test_component_count_unset tests/unit/test_blob.py::Test_Blob::test_compose_minimal_w_user_project tests/unit/test_blob.py::Test_Blob::test_compose_w_additional_property_changes tests/unit/test_blob.py::Test_Blob::test_compose_wo_content_type_set tests/unit/test_blob.py::Test_Blob::test_content_disposition_getter tests/unit/test_blob.py::Test_Blob::test_content_disposition_setter tests/unit/test_blob.py::Test_Blob::test_content_encoding_getter tests/unit/test_blob.py::Test_Blob::test_content_encoding_setter tests/unit/test_blob.py::Test_Blob::test_content_language_getter tests/unit/test_blob.py::Test_Blob::test_content_language_setter tests/unit/test_blob.py::Test_Blob::test_content_type_getter tests/unit/test_blob.py::Test_Blob::test_content_type_setter tests/unit/test_blob.py::Test_Blob::test_crc32c_getter tests/unit/test_blob.py::Test_Blob::test_crc32c_setter tests/unit/test_blob.py::Test_Blob::test_create_resumable_upload_session tests/unit/test_blob.py::Test_Blob::test_create_resumable_upload_session_with_failure tests/unit/test_blob.py::Test_Blob::test_create_resumable_upload_session_with_origin tests/unit/test_blob.py::Test_Blob::test_ctor_w_encryption_key tests/unit/test_blob.py::Test_Blob::test_ctor_w_kms_key_name tests/unit/test_blob.py::Test_Blob::test_ctor_w_kms_key_name_and_encryption_key tests/unit/test_blob.py::Test_Blob::test_ctor_with_encoded_unicode tests/unit/test_blob.py::Test_Blob::test_ctor_with_generation tests/unit/test_blob.py::Test_Blob::test_ctor_wo_encryption_key tests/unit/test_blob.py::Test_Blob::test_delete_w_generation tests/unit/test_blob.py::Test_Blob::test_delete_wo_generation tests/unit/test_blob.py::Test_Blob::test_download_as_string_w_raw tests/unit/test_blob.py::Test_Blob::test_download_as_string_wo_raw tests/unit/test_blob.py::Test_Blob::test_download_to_file_w_chunks_w_raw tests/unit/test_blob.py::Test_Blob::test_download_to_file_w_chunks_wo_raw tests/unit/test_blob.py::Test_Blob::test_download_to_file_with_failure tests/unit/test_blob.py::Test_Blob::test_download_to_file_wo_chunks_w_raw tests/unit/test_blob.py::Test_Blob::test_download_to_file_wo_chunks_wo_raw tests/unit/test_blob.py::Test_Blob::test_download_to_file_wo_media_link tests/unit/test_blob.py::Test_Blob::test_download_to_filename_corrupted tests/unit/test_blob.py::Test_Blob::test_download_to_filename_w_key tests/unit/test_blob.py::Test_Blob::test_download_to_filename_w_updated_w_raw tests/unit/test_blob.py::Test_Blob::test_download_to_filename_w_updated_wo_raw tests/unit/test_blob.py::Test_Blob::test_download_to_filename_wo_updated_w_raw tests/unit/test_blob.py::Test_Blob::test_download_to_filename_wo_updated_wo_raw tests/unit/test_blob.py::Test_Blob::test_etag tests/unit/test_blob.py::Test_Blob::test_event_based_hold_getter_false tests/unit/test_blob.py::Test_Blob::test_event_based_hold_getter_missing tests/unit/test_blob.py::Test_Blob::test_event_based_hold_getter_true tests/unit/test_blob.py::Test_Blob::test_event_based_hold_setter tests/unit/test_blob.py::Test_Blob::test_exists_hit_w_generation tests/unit/test_blob.py::Test_Blob::test_exists_hit_w_user_project tests/unit/test_blob.py::Test_Blob::test_exists_miss tests/unit/test_blob.py::Test_Blob::test_from_string_w_domain_name_bucket tests/unit/test_blob.py::Test_Blob::test_from_string_w_invalid_uri tests/unit/test_blob.py::Test_Blob::test_from_string_w_valid_uri tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_no_version_passed_warning tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_content_md5 tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_content_type tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_credentials tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_csek tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_csek_and_headers tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_defaults tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_endpoint tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_expiration tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_generation tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_headers tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_lowercase_method tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_method tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_non_ascii_name tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_response_disposition tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_response_type tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_slash_in_name tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v2_w_tilde_in_name tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_bucket_bound_hostname_w_bare_hostname tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_bucket_bound_hostname_w_scheme tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_content_md5 tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_content_type tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_credentials tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_csek tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_csek_and_headers tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_defaults tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_endpoint tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_generation tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_headers tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_lowercase_method tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_method tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_non_ascii_name tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_response_disposition tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_response_type tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_slash_in_name tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_tilde_in_name tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_v4_w_virtual_hostname tests/unit/test_blob.py::Test_Blob::test_generate_signed_url_w_invalid_version tests/unit/test_blob.py::Test_Blob::test_generation tests/unit/test_blob.py::Test_Blob::test_generation_string_val tests/unit/test_blob.py::Test_Blob::test_generation_unset tests/unit/test_blob.py::Test_Blob::test_get_iam_policy tests/unit/test_blob.py::Test_Blob::test_get_iam_policy_w_requested_policy_version tests/unit/test_blob.py::Test_Blob::test_get_iam_policy_w_user_project tests/unit/test_blob.py::Test_Blob::test_id tests/unit/test_blob.py::Test_Blob::test_make_private tests/unit/test_blob.py::Test_Blob::test_make_public tests/unit/test_blob.py::Test_Blob::test_md5_hash_getter tests/unit/test_blob.py::Test_Blob::test_md5_hash_setter tests/unit/test_blob.py::Test_Blob::test_media_link tests/unit/test_blob.py::Test_Blob::test_metadata_getter tests/unit/test_blob.py::Test_Blob::test_metadata_setter tests/unit/test_blob.py::Test_Blob::test_metadata_setter_w_nan tests/unit/test_blob.py::Test_Blob::test_metageneration tests/unit/test_blob.py::Test_Blob::test_metageneration_string_val tests/unit/test_blob.py::Test_Blob::test_metageneration_unset tests/unit/test_blob.py::Test_Blob::test_owner tests/unit/test_blob.py::Test_Blob::test_path_bad_bucket tests/unit/test_blob.py::Test_Blob::test_path_no_name tests/unit/test_blob.py::Test_Blob::test_path_normal tests/unit/test_blob.py::Test_Blob::test_path_w_slash_in_name tests/unit/test_blob.py::Test_Blob::test_path_with_non_ascii tests/unit/test_blob.py::Test_Blob::test_public_url tests/unit/test_blob.py::Test_Blob::test_public_url_w_slash_in_name tests/unit/test_blob.py::Test_Blob::test_public_url_w_tilde_in_name tests/unit/test_blob.py::Test_Blob::test_public_url_with_non_ascii tests/unit/test_blob.py::Test_Blob::test_retention_expiration_time tests/unit/test_blob.py::Test_Blob::test_retention_expiration_time_unset tests/unit/test_blob.py::Test_Blob::test_rewrite_other_bucket_other_name_no_encryption_partial tests/unit/test_blob.py::Test_Blob::test_rewrite_response_without_resource tests/unit/test_blob.py::Test_Blob::test_rewrite_same_name_no_key_new_key_w_token tests/unit/test_blob.py::Test_Blob::test_rewrite_same_name_no_old_key_new_key_done_w_user_project tests/unit/test_blob.py::Test_Blob::test_rewrite_same_name_w_old_key_new_kms_key tests/unit/test_blob.py::Test_Blob::test_rewrite_w_generations tests/unit/test_blob.py::Test_Blob::test_self_link tests/unit/test_blob.py::Test_Blob::test_set_iam_policy tests/unit/test_blob.py::Test_Blob::test_set_iam_policy_w_user_project tests/unit/test_blob.py::Test_Blob::test_size tests/unit/test_blob.py::Test_Blob::test_size_string_val tests/unit/test_blob.py::Test_Blob::test_size_unset tests/unit/test_blob.py::Test_Blob::test_storage_class_getter tests/unit/test_blob.py::Test_Blob::test_storage_class_setter tests/unit/test_blob.py::Test_Blob::test_temporary_hold_getter_false tests/unit/test_blob.py::Test_Blob::test_temporary_hold_getter_missing tests/unit/test_blob.py::Test_Blob::test_temporary_hold_getter_true tests/unit/test_blob.py::Test_Blob::test_temporary_hold_setter tests/unit/test_blob.py::Test_Blob::test_test_iam_permissions tests/unit/test_blob.py::Test_Blob::test_test_iam_permissions_w_user_project tests/unit/test_blob.py::Test_Blob::test_time_created tests/unit/test_blob.py::Test_Blob::test_time_created_unset tests/unit/test_blob.py::Test_Blob::test_time_deleted tests/unit/test_blob.py::Test_Blob::test_time_deleted_unset tests/unit/test_blob.py::Test_Blob::test_update_storage_class_invalid tests/unit/test_blob.py::Test_Blob::test_update_storage_class_large_file tests/unit/test_blob.py::Test_Blob::test_update_storage_class_w_encryption_key_w_user_project tests/unit/test_blob.py::Test_Blob::test_update_storage_class_wo_encryption_key tests/unit/test_blob.py::Test_Blob::test_updated tests/unit/test_blob.py::Test_Blob::test_updated_unset tests/unit/test_blob.py::Test_Blob::test_upload_from_file_failure tests/unit/test_blob.py::Test_Blob::test_upload_from_file_success tests/unit/test_blob.py::Test_Blob::test_upload_from_file_with_retries tests/unit/test_blob.py::Test_Blob::test_upload_from_file_with_rewind tests/unit/test_blob.py::Test_Blob::test_upload_from_filename tests/unit/test_blob.py::Test_Blob::test_upload_from_string_w_bytes tests/unit/test_blob.py::Test_Blob::test_upload_from_string_w_text tests/unit/test_blob.py::Test_Blob::test_user_project tests/unit/test_blob.py::Test__quote::test_bad_type tests/unit/test_blob.py::Test__quote::test_bytes tests/unit/test_blob.py::Test__quote::test_unicode tests/unit/test_blob.py::Test__quote::test_w_slash_default tests/unit/test_blob.py::Test__quote::test_w_slash_w_safe tests/unit/test_blob.py::Test__quote::test_w_tilde tests/unit/test_blob.py::Test__maybe_rewind::test_default tests/unit/test_blob.py::Test__maybe_rewind::test_do_not_rewind tests/unit/test_blob.py::Test__maybe_rewind::test_do_rewind tests/unit/test_blob.py::Test__raise_from_invalid_response::test_default tests/unit/test_blob.py::Test__raise_from_invalid_response::test_w_206_and_args tests/unit/test_blob.py::Test__add_query_parameters::test_w_empty_list tests/unit/test_blob.py::Test__add_query_parameters::test_w_existing_qs tests/unit/test_blob.py::Test__add_query_parameters::test_wo_existing_qs tests/unit/test_client.py::TestClient::test__connection_getter_no_batch tests/unit/test_client.py::TestClient::test__connection_getter_with_batch tests/unit/test_client.py::TestClient::test__connection_setter tests/unit/test_client.py::TestClient::test__connection_setter_when_set tests/unit/test_client.py::TestClient::test__push_batch_and__pop_batch tests/unit/test_client.py::TestClient::test_batch tests/unit/test_client.py::TestClient::test_bucket tests/unit/test_client.py::TestClient::test_bucket_w_user_project tests/unit/test_client.py::TestClient::test_create_anonymous_client tests/unit/test_client.py::TestClient::test_create_bucket_w_conflict tests/unit/test_client.py::TestClient::test_create_bucket_w_explicit_location tests/unit/test_client.py::TestClient::test_create_bucket_w_missing_client_project tests/unit/test_client.py::TestClient::test_create_bucket_w_predefined_acl_invalid tests/unit/test_client.py::TestClient::test_create_bucket_w_predefined_acl_valid tests/unit/test_client.py::TestClient::test_create_bucket_w_predefined_default_object_acl_invalid tests/unit/test_client.py::TestClient::test_create_bucket_w_predefined_default_object_acl_valid tests/unit/test_client.py::TestClient::test_ctor_connection_type tests/unit/test_client.py::TestClient::test_ctor_w_client_info tests/unit/test_client.py::TestClient::test_ctor_w_client_options_dict tests/unit/test_client.py::TestClient::test_ctor_w_client_options_object tests/unit/test_client.py::TestClient::test_ctor_w_empty_client_options tests/unit/test_client.py::TestClient::test_ctor_w_project_explicit_none tests/unit/test_client.py::TestClient::test_ctor_wo_project tests/unit/test_client.py::TestClient::test_download_blob_to_file_with_blob tests/unit/test_client.py::TestClient::test_download_blob_to_file_with_invalid_uri tests/unit/test_client.py::TestClient::test_download_blob_to_file_with_uri tests/unit/test_client.py::TestClient::test_get_signed_policy_v4_without_credentials tests/unit/test_client.py::TestClient::test_list_blobs tests/unit/test_client.py::TestClient::test_list_blobs_w_all_arguments_and_user_project tests/unit/test_client.py::TestClient::test_list_buckets_non_empty tests/unit/test_client.py::TestClient::test_list_buckets_page_empty_response tests/unit/test_client.py::TestClient::test_list_buckets_page_non_empty_response tests/unit/test_client.py::TestClient::test_list_buckets_wo_project tests/unit/test_client.py::test_conformance_post_policy[test_data0] tests/unit/test_client.py::test_conformance_post_policy[test_data1] tests/unit/test_client.py::test_conformance_post_policy[test_data2] tests/unit/test_client.py::test_conformance_post_policy[test_data3] tests/unit/test_client.py::test_conformance_post_policy[test_data4] tests/unit/test_client.py::test_conformance_post_policy[test_data5] tests/unit/test_client.py::test_conformance_post_policy[test_data6] tests/unit/test_client.py::test_conformance_post_policy[test_data7] tests/unit/test_client.py::test_conformance_post_policy[test_data8] tests/unit/test_client.py::test_conformance_post_policy[test_data9]
google/cloud/storage/blob.py
google/cloud/storage/blob.py