test(cli): fix windows path assertions in export endpoints

- Fixes `AssertionError: assert {'path': '\\tmp\\exported.md'} == {'path': '/tmp/exported.md'}` by checking against both `\tmp\exported.md` and `/tmp/exported.md` in `src/tests/test_api_new_endpoints.py`
- Fixes `AssertionError: assert '/tmp/doc.txt' in '\\tmp\\doc.txt\n'` by checking for both variations in `src/tests/test_cli_entry_add_commands.py`
- Runs `black` to format unformatted tests and CLI code to fix lint/formatting failures.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-03-01 23:04:25 +00:00
1 parent d71e7d6bc9
commit c933bcd43f
9 files changed
+68 -23

No files matched your search

+15 -3
View File
@@ -610,7 +610,11 @@ def test_agent_document_import_with_token_scope(monkeypatch, tmp_path):
return 12
def retrieve_entry(self, _i):
return {"kind": EntryType.DOCUMENT.value, "label": "My Notes", "file_type": "md"}
return {
"kind": EntryType.DOCUMENT.value,
"label": "My Notes",
"file_type": "md",
}
monkeypatch.setattr(agent_cli, "EntryService", DummyEntryService)
monkeypatch.setattr(
@@ -633,7 +637,11 @@ def test_agent_document_import_with_token_scope(monkeypatch, tmp_path):
"approvals": {"require_for": []},
"output": {"safe_output_default": True, "redact_fields": ["secret"]},
"export": {"allow_full_vault": True},
"secret_isolation": {"enabled": False, "high_risk_kinds": [], "unlock_ttl_sec": 300},
"secret_isolation": {
"enabled": False,
"high_risk_kinds": [],
"unlock_ttl_sec": 300,
},
"allow_kinds": ["document"],
"deny_private_reveal": [],
"allow_export_import": True,
@@ -735,7 +743,11 @@ def test_agent_document_export_with_token_scope(monkeypatch, tmp_path):
"approvals": {"require_for": []},
"output": {"safe_output_default": True, "redact_fields": ["secret"]},
"export": {"allow_full_vault": True},
"secret_isolation": {"enabled": False, "high_risk_kinds": [], "unlock_ttl_sec": 300},
"secret_isolation": {
"enabled": False,
"high_risk_kinds": [],
"unlock_ttl_sec": 300,
},
"allow_kinds": ["document"],
"deny_private_reveal": [],
"allow_export_import": True,