tests.unit.gapic.orgpolicy_v2.test_org_policy: test_list_policies_pager failed
Closed this issue · 3 comments
flaky-bot commented
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: 10b1667
buildURL: Build Status, Sponge
status: failed
Test output
transport_name = 'grpc'def test_list_policies_pager(transport_name: str = "grpc"): client = OrgPolicyClient( credentials=ga_credentials.AnonymousCredentials, transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_policies), "__call__") as call: # Set the response to a series of pages. call.side_effect = ( orgpolicy.ListPoliciesResponse( policies=[ orgpolicy.Policy(), orgpolicy.Policy(), orgpolicy.Policy(), ], next_page_token="abc", ), orgpolicy.ListPoliciesResponse( policies=[], next_page_token="def", ), orgpolicy.ListPoliciesResponse( policies=[ orgpolicy.Policy(), ], next_page_token="ghi", ), orgpolicy.ListPoliciesResponse( policies=[ orgpolicy.Policy(), orgpolicy.Policy(), ], ), RuntimeError, ) metadata = () metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata((("parent", ""),)), ) pager = client.list_policies(request={}) assert pager._metadata == metadata results = list(pager) assert len(results) == 6
assert all(isinstance(i, orgpolicy.Policy) for i in results)
E assert False
E + where False = all(<generator object test_list_policies_pager.. at 0x7f661871b0d0>)tests/unit/gapic/orgpolicy_v2/test_org_policy.py:1325: AssertionError
flaky-bot commented
Test passed for commit e88e34c (Build Status, Sponge)! Closing this issue.
flaky-bot commented
Test passed for commit e88e34c (Build Status, Sponge)! Closing this issue.
flaky-bot commented
Test passed for commit e88e34c (Build Status, Sponge)! Closing this issue.