updates tests for is_property_attribute

This commit is contained in:
Mose Müller
2024-04-26 09:25:11 +02:00
parent f315cd62d6
commit 1ee6a299b2
2 changed files with 19 additions and 1 deletions

View File

@@ -170,7 +170,9 @@ def get_data_service_class_reference() -> Any:
def is_property_attribute(target_obj: Any, access_path: str) -> bool:
path_parts = parse_full_access_path(access_path)
target_obj = get_object_by_path_parts(target_obj, path_parts[:-1])
# TODO: check if target_obj is dict or list
# don't have to check if target_obj is dict or list as their content cannot be
# properties -> always return False then
return isinstance(getattr(type(target_obj), path_parts[-1], None), property)