'Adding corrupt values should result in the default value.
Note that this test might fail if there is already an upgraded config stored in the default
state directory. The code being tested here however shouldn\'t be ran if that config already exists.
:return:'

def test_read_test_corr_libtribler_conf(self):

    old_config = RawConfigParser()
    old_config.read(os.path.join(self.CONFIG_PATH, 'libtriblercorrupt70.conf'))
    new_config = TriblerConfig(ConfigObj(configspec=CONFIG_SPEC_PATH))
    result_config = add_libtribler_config(new_config, old_config)
    self.assertTrue(result_config.get_permid_keypair_filename().endswith('ec.pem'))
    self.assertTrue(len(result_config.get_tunnel_community_socks5_listen_ports()), 5)
    self.assertTrue(result_config.get_metadata_store_dir().endswith('collected_metadata'))
    self.assertEqual(result_config.get_anon_proxy_settings(), (2, ('127.0.0.1', [(-1), (-1), (-1), (-1), (-1)]), ''))
    self.assertEqual(result_config.get_credit_mining_sources(), new_config.get_credit_mining_sources())
