The flow will be a creation of CombinedConversationHandler and/or CombinedMessageHandler, with mocked parts.
The idea is mocking the bot parameter/object, in order to log the responses so they can be tested.
For the mock, we probably should inherit CombinedMessageHandler, because it inherits MessageHandler and uses MessageHandler.handle_update() to call the updates-handling callback with the bot parameter. Maybe the dispatcher has to be mocked/inherited too.
We haven't yet thought about how to deeply mock incoming updates/messages - maybe we would like to override the function (I don't know which one it is) that checks for incoming updates and handles them (I guess it's in one of Update or Dispatcher classes).
We will begin with reading and parsing the configuration, through generating test messages to trigger the triggers, and checking the responded messages in the end.
Note: This is a follow-up task for #10.
We should create end-to-end tests for gramhopper.
The flow will be a creation of
CombinedConversationHandler
and/orCombinedMessageHandler
, with mocked parts. The idea is mocking thebot
parameter/object, in order to log the responses so they can be tested. For the mock, we probably should inheritCombinedMessageHandler
, because it inheritsMessageHandler
and usesMessageHandler.handle_update()
to call the updates-handling callback with thebot
parameter. Maybe thedispatcher
has to be mocked/inherited too.We haven't yet thought about how to deeply mock incoming updates/messages - maybe we would like to override the function (I don't know which one it is) that checks for incoming updates and handles them (I guess it's in one of
Update
orDispatcher
classes).We will begin with reading and parsing the configuration, through generating test messages to trigger the triggers, and checking the responded messages in the end.