mirror of
https://github.com/aljazceru/python-teos.git
synced 2026-02-05 22:54:22 +01:00
Moves extend paths from tools to ConfigLoader
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user