Exemple #1
0
    def test_loadWithExistingFile(self):
        config_path = _get_config_file_path()

        if exists(config_path):
            os.remove(config_path)

        assert catcher.lastLogRecord is None
        load()
        assert catcher.lastLogRecord is not None
Exemple #2
0
    def test_loadWithoutExistingFile(self):
        config_path = _get_config_file_path()

        if exists(config_path):
            os.remove(config_path)

        # create a config file
        set('lang', 'plop')

        assert catcher.lastLogRecord is None
        load()
        assert catcher.lastLogRecord is None

        assert get('lang') == 'plop'