Moves extend paths from tools to ConfigLoader

This commit is contained in:
Sergi Delgado Segura
2020-03-23 13:04:50 +01:00
parent e2ce7ae1a4
commit 02eefd5807
4 changed files with 37 additions and 41 deletions

View File

@@ -7,7 +7,6 @@ from common.tools import (
check_locator_format,
compute_locator,
setup_data_folder,
extend_paths,
setup_logging,
)
from test.common.unit.conftest import get_random_value_hex
@@ -66,23 +65,6 @@ def test_setup_data_folder():
os.rmdir(test_folder)
def test_extend_paths():
# Test that only items with the path flag are extended
config_fields = {
"foo": {"value": "foofoo"},
"var": {"value": "varvar", "path": True},
"foovar": {"value": "foovarfoovar"},
}
base_path = "base_path/"
extend_paths(base_path, config_fields)
for k, field in config_fields.items():
if field.get("path") is True:
assert base_path in field.get("value")
else:
assert base_path not in field.get("value")
def test_setup_logging():
# Check that setup_logging creates two new logs for every prefix
prefix = "foo"