Skip to content

test(linkedin): add unit tests for the LinkedInChannel doctor branches - #570

Closed
nyxst4ck wants to merge 1 commit into
Panniantong:mainfrom
nyxst4ck:test-linkedin-channel
Closed

test(linkedin): add unit tests for the LinkedInChannel doctor branches#570
nyxst4ck wants to merge 1 commit into
Panniantong:mainfrom
nyxst4ck:test-linkedin-channel

Conversation

@nyxst4ck

@nyxst4ck nyxst4ck commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What

Dedicated offline tests for the linkedin channel — the channel had no dedicated test file. 6 tests covering:

  • can_handle: linkedin.com host match (case-insensitive) and rejection of lookalike hosts
  • check() all five branches:
    • mcporter missing → off with the Jina Reader fallback hint
    • unreadable mcporter config → error (and stale active_backend cleared)
    • LinkedIn MCP present in config (all 3 accepted aliases) → warn, never ok — Doctor must not claim usability without a live probe
    • editor imports left unexpanded → warn (credential-read boundary)
    • mcporter installed but LinkedIn unconfigured → off with the exact mcporter config add linkedin prescription

How

inspect_mcporter_config and shutil.which are stubbed at the channel module, so every branch runs offline and deterministic — same approach as the merged channel-test series.

Test plan

  • pytest tests/test_linkedin_channel.py -v → 6 passed
  • Full suite: 416 passed (the 10 failures in test_private_file_writes.py are pre-existing Windows symlink-permission failures on my machine, untouched by this PR)

Follow-up to #331 — continues the dedicated channel coverage series after rss (#360), github (#361), web (#363), reddit (#364), xueqiu (#365), v2ex (#366) and youtube (#367).

@Panniantong

Copy link
Copy Markdown
Owner

感谢补充 LinkedIn Doctor 分支测试。merged #577 已按当前 mcp-server-linkedin、uvx 和 stdio 契约覆盖缺失、配置错误、未安装 uvx、已配置但未实测及 editor imports 等路径;本 PR 仍断言旧 linkedin-scraper-mcp 提示,因此作为已取代测试关闭。

@Panniantong Panniantong closed this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants