Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_load_config_yaml():
config_json = os.path.join(os.path.dirname(__file__), 'data', 'urlwatch.yaml')
if os.path.exists(config_json):
config = YamlConfigStorage(config_json)
assert config is not None
assert config.config is not None
assert config.config == storage.DEFAULT_CONFIG
def test_load_config_json():
config_json = os.path.join(os.path.dirname(__file__), 'data', 'urlwatch.json')
if os.path.exists(config_json):
config = JsonConfigStorage(config_json)
assert config is not None
assert config.config is not None
assert config.config == storage.DEFAULT_CONFIG