Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
Loading items

Target

Select target project
  • caosdb/src/caosdb-pylib
1 result
Select Git revision
Loading items
Show changes
[Connection]
url=https://localhost:10443/
username=admin
password_method=input
[Connection]
url=https://localhost:10443/
username=admin
# No password method: should be "input" by default
......@@ -2,7 +2,9 @@
#
# This file is a part of the CaosDB Project.
#
# Copyright (C) 2022 Indiscale GmbH <info@indiscale.com>
# Copyright (C) 2021 Alexander Schlemmer
# Copyright (C) 2022 Daniel Hornung <d.hornung@indiscale.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
......@@ -31,15 +33,18 @@ from configparser import ConfigParser
def test_config_files():
for fn in glob(os.path.join(os.path.dirname(__file__), "test_configs", "*.ini")):
print(f"Testing {fn}.")
c = ConfigParser()
c.read(fn)
print(config_to_yaml(c))
validate_yaml_schema(config_to_yaml(c))
def test_broken_config_files():
for fn in glob(os.path.join(os.path.dirname(__file__), "broken_configs", "*.ini")):
print(fn)
print(f"Testing {fn}.")
with raises(ValidationError):
c = ConfigParser()
c.read(fn)
print(config_to_yaml(c))
validate_yaml_schema(config_to_yaml(c))