mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-11 07:47:12 +02:00
refactoring serializer module methods
This commit is contained in:
@ -2,7 +2,7 @@ import logging
|
||||
|
||||
import pydase
|
||||
from pydase.data_service.data_service_cache import DataServiceCache
|
||||
from pydase.utils.helpers import get_nested_value_from_DataService_by_path_and_key
|
||||
from pydase.utils.serializer import get_nested_dict_by_path
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
@ -19,15 +19,7 @@ def test_nested_attributes_cache_callback() -> None:
|
||||
cache = DataServiceCache(test_service)
|
||||
|
||||
test_service.name = "Peepz"
|
||||
assert (
|
||||
get_nested_value_from_DataService_by_path_and_key(cache.cache, "name")
|
||||
== "Peepz"
|
||||
)
|
||||
assert get_nested_dict_by_path(cache.cache, "name")["value"] == "Peepz"
|
||||
|
||||
test_service.class_attr.name = "Ciao"
|
||||
assert (
|
||||
get_nested_value_from_DataService_by_path_and_key(
|
||||
cache.cache, "class_attr.name"
|
||||
)
|
||||
== "Ciao"
|
||||
)
|
||||
assert get_nested_dict_by_path(cache.cache, "class_attr.name")["value"] == "Ciao"
|
||||
|
Reference in New Issue
Block a user