'Test configlet_action add that doesn\'t change configlet adds proper
info to return data. Does not including any task info.'

@patch('ansible.modules.network.cloudvision.cv_server_provision.config_from_template')
def test_configlet_action_add_no_task(self, mock_template):

    module = Mock()
    module.params = dict(action='add', switch_name='eos', switch_port='3')
    config = '!\ninterface    Ethernet3\n            description    test\n!\ninterface    Ethernet4\n!'
    configlet = dict(name='eos-server', key='key', config=config)
    template_config = 'interface    Ethernet3\n            description    test\n!'
    mock_template.return_value = template_config
    update_return = dict(data='Configlet    eos-server    successfully    updated.')
    module.client.api.update_configlet.return_value = update_return
    result = cv_server_provision.configlet_action(module, configlet)
    self.assertIsNotNone(result)
    self.assertEqual(result['oldConfigBlock'], 'interface    Ethernet3\n            description    test\n!')
    self.assertEqual(result['fullConfig'], config)
    self.assertEqual(result['updateConfigletResponse'], update_return['data'])
    self.assertNotIn('changed', result)
    self.assertNotIn('taskCreated', result)
    self.assertEqual(module.client.api.update_configlet.call_count, 1)
