项目文件夹

文件
wehub-resource-sync 4deafc5b1e
🌿 Preview Python SDK / changed-files (push) Has been cancelled
🌿 Preview Python SDK / preview-python-sdk (push) Has been cancelled
🌿 Preview TypeScript SDK / changed-files (push) Has been cancelled
🌿 Preview TypeScript SDK / preview-typescript-sdk (push) Has been cancelled
Sync Code / notify (push) Has been cancelled
Test Package Installation / test-install (3.13) (push) Has been cancelled
Test Package Installation / test-install (3.12) (push) Has been cancelled
Notify Submodule Repos / notify (push) Has been cancelled
Run Docker integration tests / test (push) Has been cancelled
🌿 Publish Docs / run (push) Has been cancelled
Test Package Installation / test-install (3.11) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:40:25 +08:00

32 行
962 B
Python

from conftest import create_test_module
from letta_client import UnprocessableEntityError
from letta.constants import CORE_MEMORY_BLOCK_CHAR_LIMIT
BLOCKS_CREATE_PARAMS = [
("human_block", {"label": "human", "value": "test"}, {"limit": CORE_MEMORY_BLOCK_CHAR_LIMIT}, None),
("persona_block", {"label": "persona", "value": "test1"}, {"limit": CORE_MEMORY_BLOCK_CHAR_LIMIT}, None),
]
BLOCKS_UPDATE_PARAMS = [
("human_block", {"value": "test2"}, {}, None),
("persona_block", {"value": "testing testing testing", "limit": 10}, {}, UnprocessableEntityError),
]
BLOCKS_LIST_PARAMS = [
({}, 2),
({"label": "human"}, 1),
({"label": "persona"}, 1),
]
# Create all test module components at once
globals().update(
create_test_module(
resource_name="blocks",
id_param_name="block_id",
create_params=BLOCKS_CREATE_PARAMS,
update_params=BLOCKS_UPDATE_PARAMS,
list_params=BLOCKS_LIST_PARAMS,
)
)