예제 #1
0
async def test_message_processor(default_processor):
    out = CollectingOutputChannel()
    await default_processor.handle_message(
        UserMessage('/greet{"name":"Core"}', out))
    assert {
        'recipient_id': 'default',
        'text': 'hey there Core!'
    } == out.latest_output()
예제 #2
0
async def test_message_processor(default_channel: CollectingOutputChannel,
                                 default_processor: MessageProcessor):
    await default_processor.handle_message(
        UserMessage('/greet{"name":"Core"}', default_channel))
    assert {
        "recipient_id": "default",
        "text": "hey there Core!",
    } == default_channel.latest_output()