SIENTIAPDE-1005
Full coverage Refactor code structure and improve logging configuration; update tests for activities and connectors
This commit is contained in:
@@ -36,3 +36,25 @@ async def test_scouter_workflow(mock_workflow, scouter):
|
||||
'data': 'test_data'
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@mark.asyncio
|
||||
@patch('scouter.workflow.scouter.workflow', new_callable=AsyncMock)
|
||||
async def test_scouter_workflow_empty(mock_workflow, scouter):
|
||||
mock_workflow.execute_activity_method.return_value = {}
|
||||
await scouter.run(
|
||||
input_data={
|
||||
'topic': 'test_topic'
|
||||
}
|
||||
)
|
||||
|
||||
mock_workflow.execute_activity_method.assert_called_once_with(
|
||||
Activities.load_from_kafka,
|
||||
{
|
||||
'topic': 'test_topic'
|
||||
},
|
||||
retry_policy=ANY,
|
||||
start_to_close_timeout=ANY
|
||||
)
|
||||
|
||||
mock_workflow.execute_child_workflow.assert_not_called()
|
||||
|
||||
Reference in New Issue
Block a user