'Test get_check_config with mocked container inspect and config template'

@mock.patch('config.get_auto_confd_path', return_value=os.path.join(os.path.dirname(__file__), 'fixtures/auto_conf/'))
@mock.patch('utils.dockerutil.DockerUtil.client', return_value=None)
@mock.patch.object(SDDockerBackend, '_get_host_address', return_value='127.0.0.1')
@mock.patch.object(SDDockerBackend, '_get_port', return_value='1337')
@mock.patch.object(SDDockerBackend, '_get_config_templates', side_effect=_get_conf_tpls)
def test_get_check_configs(self, *args):

    c_id = self.docker_container_inspect.get('Id')
    for image in self.mock_templates.keys():
        sd_backend = get_sd_backend(agentConfig=self.auto_conf_agentConfig)
        state = _SDDockerBackendConfigFetchState(_get_container_inspect)
        self.assertEquals(sd_backend._get_check_configs(state, c_id, image)[0], self.mock_templates[image][1])
        clear_singletons(self.auto_conf_agentConfig)
