Files
hermes-agent/tests
Tair Asim 134bf66b3b test(telegram): cover the lazy-install rebind path
Drives the real imported-before-installed transition: seeds a fake SDK
into sys.modules, resets the adapter globals to the placeholder the
fallback block leaves behind, stubs the installer to a no-op, then calls
check_telegram_requirements() and asserts no placeholder survived.

Asserting over the whole stubbed set rather than one name means the next
symbol dropped from the rebind list fails here too, naming itself:

    AssertionError: lazy install left these bound to the import-time
    placeholder: ['TypeHandler']

Originally written by Tair Asim in #85607, which was closed as a
duplicate of this PR. Moved into its own file to match the convention
already used by test_discord_lazy_install_views.py and
test_feishu_lazy_import.py, and widened from three hard-coded symbol
checks to the full set.

Co-authored-by: Pavel Lesyuk <paul.lesyuk@gmail.com>
2026-08-16 22:20:35 -07:00
..