mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-26 21:39:43 +02:00
references: folder path tests
This commit is contained in:
parent
b5a6e4c32a
commit
5faf0da5bf
1 changed files with 21 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
"""Tests for folder pointer-path shaping."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
from app.agents.chat.runtime.references.folders import folder_pointer_path
|
||||
|
||||
pytestmark = pytest.mark.unit
|
||||
|
||||
|
||||
def test_adds_trailing_slash_so_path_reads_as_directory() -> None:
|
||||
assert folder_pointer_path(7, {7: "/documents/Specs"}) == "/documents/Specs/"
|
||||
|
||||
|
||||
def test_keeps_existing_trailing_slash() -> None:
|
||||
assert folder_pointer_path(7, {7: "/documents/Specs/"}) == "/documents/Specs/"
|
||||
|
||||
|
||||
def test_unknown_folder_falls_back_to_documents_root() -> None:
|
||||
assert folder_pointer_path(99, {}) == "/documents/"
|
||||
Loading…
Add table
Add a link
Reference in a new issue