| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
As it is a bit more robust, I added version.py to google-cloud-storage |
Sorry, something went wrong.
|
@crwilcox Needs a git add google/cloud/storage/version.py. |
Sorry, something went wrong.
|
Test failures seem unrelated to me? _______________________________________________________________ TestClient.test_lookup_bucket_with_metageneration_match ________________________________________________________________
self = <tests.unit.test_client.TestClient testMethod=test_lookup_bucket_with_metageneration_match>
def test_lookup_bucket_with_metageneration_match(self):
from google.cloud.storage.bucket import Bucket
PROJECT = "PROJECT"
CREDENTIALS = _make_credentials()
METAGENERATION_NUMBER = 6
client = self._make_one(project=PROJECT, credentials=CREDENTIALS)
BUCKET_NAME = "bucket-name"
URI1 = "/".join(
[
client._connection.API_BASE_URL,
"storage",
client._connection.API_VERSION,
"b",
"%s?projection=noAcl&ifMetagenerationMatch=%s"
% (BUCKET_NAME, METAGENERATION_NUMBER),
]
)
URI2 = "/".join(
[
client._connection.API_BASE_URL,
"storage",
client._connection.API_VERSION,
"b",
"%s?ifMetagenerationMatch=%s&projection=noAcl"
% (BUCKET_NAME, METAGENERATION_NUMBER),
]
)
data = {"name": BUCKET_NAME}
http = _make_requests_session([_make_json_response(data)])
client._http_internal = http
bucket = client.lookup_bucket(
BUCKET_NAME, if_metageneration_match=METAGENERATION_NUMBER
)
self.assertIsInstance(bucket, Bucket)
self.assertEqual(bucket.name, BUCKET_NAME)
http.request.assert_called_once_with(
method="GET",
url=mock.ANY,
data=mock.ANY,
headers=mock.ANY,
timeout=self._get_default_timeout(),
)
_, kwargs = http.request.call_args
> self.assertIn(kwargs.get("url"), (URI1, URI2))
E AssertionError: 'https://storage.googleapis.com/storage/v1/b/bucket-name?projection=noAcl&ifMetagenerationMatch=6&prettyPrint=false' not found in ('https://storage.googleapis.com/storage/v1/b/bucket-name?projection=noAcl&ifMetagenerationMatch=6', 'https://storage.googleapis.com/storage/v1/b/bucket-name?ifMetagenerationMatch=6&projection=noAcl')
tests/unit/test_client.py:663: AssertionError
Seems prettyPrint is showing up? Confirmed same failures on master. @andrewsg |
Sorry, something went wrong.
|
@crwilcox &prettyPrint=False got added to URLs via https://www.github.com/googleapis/python-cloud-core/pull/28. |
Sorry, something went wrong.
|
We need to pull in @tswast's changes from #277 to get the tests to pass on latest google-cloud-core. |
Sorry, something went wrong.
Sorry, something went wrong.
…sion via get_distribution (googleapis#288) Co-authored-by: Tres Seaver <tseaver@palladion.com>
…sion via get_distribution (googleapis#288) Co-authored-by: Tres Seaver <tseaver@palladion.com>
| Back | FazBrowse Home | New Git URL |
No description provided.