'Test config_from_template good. No template.'

@patch('jinja2.DebugUndefined')
@patch('jinja2.Environment')
@patch('jinja2.FileSystemLoader')
def test_config_from_template_no_template(self, mock_file_sys, mock_env, mock_debug):

    module = Mock()
    module.fail_json.side_effect = SystemExit
    module.params = dict(switch_name='eos', switch_port='3', server_name='new', template='jinja.j2')
    mock_file_sys.return_value = 'file'
    mock_debug.return_value = 'debug'
    env_mock = Mock()
    env_mock.get_template.return_value = None
    mock_env.return_value = env_mock
    self.assertRaises(SystemExit, cv_server_provision.config_from_template, module)
    self.assertEqual(mock_file_sys.call_count, 1)
    self.assertEqual(mock_env.call_count, 1)
    self.assertEqual(module.fail_json.call_count, 1)
