googleapis/python-certificate-manager

tests.unit.gapic.certificate_manager_v1.test_certificate_manager: test_list_certificates_pager failed

flaky-bot opened this issue · 0 comments

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: ab9d1ae
buildURL: Build Status, Sponge
status: failed

Test output
transport_name = 'grpc'
def test_list_certificates_pager(transport_name: str = "grpc"):
    client = CertificateManagerClient(
        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_certificates), "__call__"
    ) as call:
        # Set the response to a series of pages.
        call.side_effect = (
            certificate_manager.ListCertificatesResponse(
                certificates=[
                    certificate_manager.Certificate(),
                    certificate_manager.Certificate(),
                    certificate_manager.Certificate(),
                ],
                next_page_token="abc",
            ),
            certificate_manager.ListCertificatesResponse(
                certificates=[],
                next_page_token="def",
            ),
            certificate_manager.ListCertificatesResponse(
                certificates=[
                    certificate_manager.Certificate(),
                ],
                next_page_token="ghi",
            ),
            certificate_manager.ListCertificatesResponse(
                certificates=[
                    certificate_manager.Certificate(),
                    certificate_manager.Certificate(),
                ],
            ),
            RuntimeError,
        )

        metadata = ()
        metadata = tuple(metadata) + (
            gapic_v1.routing_header.to_grpc_metadata((("parent", ""),)),
        )
        pager = client.list_certificates(request={})

        assert pager._metadata == metadata

        results = list(pager)
        assert len(results) == 6
      assert all(isinstance(i, certificate_manager.Certificate) for i in results)

E assert False
E + where False = all(<generator object test_list_certificates_pager.. at 0x7f1121ede650>)

tests/unit/gapic/certificate_manager_v1/test_certificate_manager.py:973: AssertionError