This repository was archived by the owner on Jul 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
This repository was archived by the owner on Jul 6, 2023. It is now read-only.
tests.unit.gapic.service_usage_v1.test_service_usage: test_list_services_async_pager failed #111
Copy link
Copy link
Closed
Labels
api: serviceusageIssues related to the googleapis/python-service-usage API.Issues related to the googleapis/python-service-usage API.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.An issue filed by the Flaky Bot. Should not be added manually.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
This test failed!
To configure my behavior, see the Flaky Bot documentation.
If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.
commit: 8c736eb
buildURL: Build Status, Sponge
status: failed
Test output
@pytest.mark.asyncio
async def test_list_services_async_pager():
client = ServiceUsageAsyncClient(
credentials=ga_credentials.AnonymousCredentials,
)
# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(
type(client.transport.list_services), "__call__", new_callable=mock.AsyncMock
) as call:
# Set the response to a series of pages.
call.side_effect = (
serviceusage.ListServicesResponse(
services=[
resources.Service(),
resources.Service(),
resources.Service(),
],
next_page_token="abc",
),
serviceusage.ListServicesResponse(
services=[],
next_page_token="def",
),
serviceusage.ListServicesResponse(
services=[
resources.Service(),
],
next_page_token="ghi",
),
serviceusage.ListServicesResponse(
services=[
resources.Service(),
resources.Service(),
],
),
RuntimeError,
)
async_pager = await client.list_services(
request={},
)
assert async_pager.next_page_token == "abc"
responses = []
async for response in async_pager: # pragma: no branch
responses.append(response)
assert len(responses) == 6
assert all(isinstance(i, resources.Service) for i in responses)
E assert False
E + where False = all(<generator object test_list_services_async_pager.. at 0x7f88d56f5ba0>)
tests/unit/gapic/service_usage_v1/test_service_usage.py:1379: AssertionError
Metadata
Metadata
Assignees
Labels
api: serviceusageIssues related to the googleapis/python-service-usage API.Issues related to the googleapis/python-service-usage API.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.An issue filed by the Flaky Bot. Should not be added manually.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.