Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

tests.unit.gapic.contact_center_insights_v1.test_contact_center_insights: test_list_analyses_async_pager failed #185

Closed
flaky-bot bot opened this issue May 26, 2022 · 1 comment
Labels
api: contactcenterinsights Issues related to the googleapis/python-contact-center-insights API. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@flaky-bot
Copy link

flaky-bot bot commented May 26, 2022

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

Test output
@pytest.mark.asyncio
    async def test_list_analyses_async_pager():
        client = ContactCenterInsightsAsyncClient(
            credentials=ga_credentials.AnonymousCredentials,
        )
    # Mock the actual call within the gRPC stub, and fake the request.
    with mock.patch.object(
        type(client.transport.list_analyses), "__call__", new_callable=mock.AsyncMock
    ) as call:
        # Set the response to a series of pages.
        call.side_effect = (
            contact_center_insights.ListAnalysesResponse(
                analyses=[
                    resources.Analysis(),
                    resources.Analysis(),
                    resources.Analysis(),
                ],
                next_page_token="abc",
            ),
            contact_center_insights.ListAnalysesResponse(
                analyses=[],
                next_page_token="def",
            ),
            contact_center_insights.ListAnalysesResponse(
                analyses=[
                    resources.Analysis(),
                ],
                next_page_token="ghi",
            ),
            contact_center_insights.ListAnalysesResponse(
                analyses=[
                    resources.Analysis(),
                    resources.Analysis(),
                ],
            ),
            RuntimeError,
        )
        async_pager = await client.list_analyses(
            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.Analysis) for i in responses)

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

tests/unit/gapic/contact_center_insights_v1/test_contact_center_insights.py:3047: AssertionError

@flaky-bot flaky-bot bot added flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels May 26, 2022
@flaky-bot
Copy link
Author

flaky-bot bot commented May 26, 2022

Closing as a duplicate of #183

@flaky-bot flaky-bot bot closed this as completed May 26, 2022
@product-auto-label product-auto-label bot added the api: contactcenterinsights Issues related to the googleapis/python-contact-center-insights API. label May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: contactcenterinsights Issues related to the googleapis/python-contact-center-insights API. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

0 participants