From: Benjamin Braatz Date: Sun, 21 Mar 2021 01:53:09 +0000 (+0100) Subject: Adapt Init test to stronger CONF_SCHEMA. X-Git-Tag: v0.3.0~50 X-Git-Url: http://git.graph-it.com/?a=commitdiff_plain;h=5b9898c9db9606a9961ec42e0c9354a7728abc74;p=graphit%2Fcontrolpi.git Adapt Init test to stronger CONF_SCHEMA. --- diff --git a/controlpi/__init__.py b/controlpi/__init__.py index 173af72..22d4e9e 100644 --- a/controlpi/__init__.py +++ b/controlpi/__init__.py @@ -141,7 +141,8 @@ async def test(conf: Dict[str, PluginConf], 'messages' is a required property Failed validating 'required' in schema: - {'properties': {'messages': {'type': 'array'}}, + {'properties': {'messages': {'items': {'type': 'object'}, + 'type': 'array'}}, 'required': ['messages']} On instance: @@ -167,4 +168,6 @@ async def test(conf: Dict[str, PluginConf], await asyncio.sleep(0) for message in messages: await message_bus.send(Message('test()', message)) + # Give immediate reactions to these messages opportunity to happen: + await asyncio.sleep(0) await message_bus._queue.join()