def test_read_test_tribler_conf(self):
     """
     Test upgrading a Tribler configuration from 7.0 to 7.1
     """
     old_config = RawConfigParser()
     old_config.read(os.path.join(self.CONFIG_PATH, "tribler70.conf"))
     new_config = TriblerConfig()
     result_config = add_tribler_config(new_config, old_config)
     self.assertEqual(result_config.get_default_safeseeding_enabled(), True)
    def test_read_test_corr_tribler_conf(self):
        """
        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:
        """
        old_config = RawConfigParser()
        old_config.read(os.path.join(self.CONFIG_PATH, "triblercorrupt70.conf"))
        new_config = TriblerConfig()
        result_config = add_tribler_config(new_config, old_config)
        self.assertEqual(result_config.get_default_anonymity_enabled(), True)