Skip to content

Commit 820b7d7

Browse files
committed
test complete
1 parent c81ffad commit 820b7d7

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

packages/models-library/src/models_library/api_schemas_storage/storage_schemas.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,10 @@ class SoftCopyBody(BaseModel):
407407
class PathMetaDataGet(BaseModel):
408408
path: Annotated[Path, Field(description="the path to the current path")]
409409
display_path: Annotated[
410-
Path, Field(description="the path to display with UUID replaced")
410+
Path,
411+
Field(
412+
description="the path to display with UUID replaced (URL Encoded by parts as names may contain '/')"
413+
),
411414
]
412415

413416
file_meta_data: Annotated[

services/storage/tests/unit/test_handlers_paths.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,14 @@ async def test_list_paths_with_display_name_containing_slashes(
484484
expected_paths=expected_paths,
485485
check_total=False,
486486
)
487+
488+
expected_display_path = "/".join(
489+
[
490+
quote(project_name_with_slashes, safe=""),
491+
quote(node_name_with_non_ascii, safe=""),
492+
*(expected_paths[0][0].parts[2:]),
493+
],
494+
)
487495
assert page_of_paths.items[0].display_path == Path(
488-
quote(project_name_with_slashes, safe="")
489-
) / quote(
490-
node_name_with_non_ascii, safe=""
496+
expected_display_path
491497
), "display path parts should be url encoded"

0 commit comments

Comments
 (0)