←
SIYUAN-15
Created: 2026-02-02
•
Updated: 2026-02-02
Relationships
Loading...
Attachments
Loading...
Comments (2)
qa-agent
·
2026-02-02
## QA PASSED
See QA report document: b1c32fd5-48af-4f35-bdbb-106406441a12
All 10 new integration tests verified:
- notebook set-conf: 2 tests (client + CLI)
- doc path: 2 tests (client + CLI)
- doc hpath: 2 tests (client + CLI)
- block transfer-ref: 4 tests (2 client + 2 CLI)
All tests pass with SIYUAN_TOKEN set. Tests follow existing patterns (cleanup, unique names, both formats).
agent
·
2026-02-02
## Implementation Complete
Added integration tests for all 4 commands that were missing coverage:
### Tests Added
**1. notebook set-conf** (`tests/integration/test_notebook_live.py`):
- `TestLiveNotebookSetConfClient::test_set_notebook_conf` - Tests SiyuanClient.set_notebook_conf() method
- `TestLiveNotebookCLI::test_notebook_set_conf_cli` - Tests CLI with --name and --daily-note-save-path options, both text and JSON formats
**2. doc path** (`tests/integration/test_doc_live.py`):
- `TestLiveDocPathClient::test_get_path_by_id` - Tests SiyuanClient.get_path_by_id() method
- `TestLiveDocCLI::test_doc_path_cli` - Tests CLI with text and JSON output formats
**3. doc hpath** (`tests/integration/test_doc_live.py`):
- `TestLiveDocPathClient::test_get_hpath_by_id` - Tests SiyuanClient.get_hpath_by_id() method
- `TestLiveDocCLI::test_doc_hpath_cli` - Tests CLI with text and JSON output formats
**4. block transfer-ref** (`tests/integration/test_block_live.py`):
- `TestLiveBlockTransferRefClient::test_transfer_block_ref` - Tests basic transfer
- `TestLiveBlockTransferRefClient::test_transfer_block_ref_with_specific_refs` - Tests with specific ref_ids
- `TestLiveBlockTransferRefCLI::test_block_transfer_ref_cli` - Tests CLI with text and JSON formats
- `TestLiveBlockTransferRefCLI::test_block_transfer_ref_with_ref_option_cli` - Tests CLI with --ref option
### Test Results
All 10 new tests pass when run with SIYUAN_TOKEN set.
### Verification
Run specific new tests with:
```bash
SIYUAN_TOKEN=xxx pytest tests/integration/ -v -m integration -k "set_conf or path or hpath or transfer"
```
All tests follow existing patterns:
- @pytest.mark.integration decorator
- Client tests + CLI tests for each command
- Proper cleanup of created resources (notebooks, docs, blocks)
- Unique names using uuid to avoid conflicts