'Test configlet_update_task gets task after one try.'

@patch('time.sleep')
@patch('ansible.modules.network.cloudvision.cv_server_provision.switch_info')
def test_configlet_update_task_good_one_try(self, mock_info, mock_sleep):

    module = Mock()
    task = dict(data=dict(WORKFLOW_ACTION='Configlet    Push'), description='Configlet    Assign', workOrderId='7')
    device_info = dict(taskIdList=[task])
    mock_info.return_value = device_info
    result = cv_server_provision.configlet_update_task(module)
    self.assertEqual(result, '7')
    mock_sleep.assert_not_called()
    self.assertEqual(mock_info.call_count, 1)
