示例#1
0
    async def test_twin_dropped_reported_properties_publish_2nd_call(
            self, client, before_api_call, after_api_call, registry):
        await client.patch_twin(sample_content.make_reported_props())

        await before_api_call()
        props = sample_content.make_reported_props()
        patch_future = asyncio.ensure_future(client.patch_twin(props))
        await after_api_call()

        await patch_future
        await wait_for_reported_properties_update(properties_sent=props,
                                                  client=client,
                                                  registry=registry)
示例#2
0
    async def test_twin_reported_props(self, client, registry):
        properties_sent = sample_content.make_reported_props()

        await client.enable_twin()
        await client.patch_twin(properties_sent)

        await wait_for_reported_properties_update(
            properties_sent=properties_sent, client=client, registry=registry)
示例#3
0
    async def do_test_reported_properties(self, *, client, registry, count, time_limit):
        await client.enable_twin()

        for i in range(0, count):
            if time_limit.is_test_done():
                return

            logger("reported_properties {}/{}".format(i + 1, count))

            properties_sent = sample_content.make_reported_props()

            await client.patch_twin(properties_sent)

            await wait_for_reported_properties_update(
                properties_sent=properties_sent, client=client, registry=registry
            )