hermes-agent/tests/hermes_cli/test_config_shapes.py
alt-glitch 4b16341975 refactor(restructure): rewrite all imports for hermes_agent package
Rewrite all import statements, patch() targets, sys.modules keys,
importlib.import_module() strings, and subprocess -m references to use
hermes_agent.* paths.

Strip sys.path.insert hacks from production code (rely on editable install).
Update COMPONENT_PREFIXES for logger filtering.
Fix 3 hardcoded getLogger() calls to use __name__.
Update transport and tool registry discovery paths.
Update plugin module path strings.
Add legacy process-name patterns for gateway PID detection.
Add main() to skills_sync for console_script entry point.
Fix _get_bundled_dir() path traversal after move.

Part of #14182, #14183
2026-04-23 08:35:34 +05:30

28 lines
863 B
Python

"""Runtime smoke tests for `_CamofoxConfig` / `_BrowserConfig` TypedDict shapes."""
from __future__ import annotations
def test_camofox_config_is_partial_typeddict():
from hermes_agent.cli.config import _CamofoxConfig
cfg_empty: _CamofoxConfig = {}
cfg_with_field: _CamofoxConfig = {"managed_persistence": True}
assert cfg_empty == {}
assert cfg_with_field.get("managed_persistence") is True
def test_camofox_config_nested_in_browser_config():
from hermes_agent.cli.config import _BrowserConfig
browser: _BrowserConfig = {
"inactivity_timeout": 60,
"command_timeout": 10,
"record_sessions": False,
"allow_private_urls": False,
"cdp_url": "http://localhost:9222",
"camofox": {"managed_persistence": False},
}
assert browser["camofox"].get("managed_persistence") is False