'Test _get_auto_config'

@mock.patch('config.get_auto_confd_path', return_value=os.path.join(os.path.dirname(__file__), 'fixtures/auto_conf/'))
def test_get_auto_config(self, mock_get_auto_confd_path):

    expected_tpl = {'disk': [('disk', None, {'host': '%%host%%', 'port': '%%port%%'})], 'consul': [('consul', None, {'url': 'http://%%host%%:%%port%%', 'catalog_checks': True, 'new_leader_checks': True})], 'disk:v1': [('disk', None, {'host': '%%host%%', 'port': '%%port%%'})], 'foobar': []}
    config_store = get_config_store(self.auto_conf_agentConfig)
    for image in expected_tpl.keys():
        config = config_store._get_auto_config(image)
        self.assertEquals(config, expected_tpl.get(image))
