test: add full integration test suite for live API verification#18
Open
adamweeks wants to merge 2 commits into
Open
test: add full integration test suite for live API verification#18adamweeks wants to merge 2 commits into
adamweeks wants to merge 2 commits into
Conversation
39 tests covering the complete tool surface against a real Webex bot token. All tests are skipped automatically during normal CI runs and opt-in via WEBEX_INTEGRATION_TESTS=1 + WEBEX_ACCESS_TOKEN to prevent unit-test mock interference. Coverage: - People: get_webex_me, list_webex_people - Rooms: full CRUD lifecycle + post-delete GET verification - Messages: text, markdown, space alias, list, delete - Adaptive cards: build_webex_adaptive_card, send_webex_adaptive_card - Memberships: list, response shape, bot-is-moderator assertion - Space aliases: full create→get→list→update→delete lifecycle - Teams: list (bots cannot create teams) - Error handling: structured E-code responses for invalid IDs and missing required parameters across all tool categories Each class manages its own tearDownClass cleanup so resources are deleted even when individual tests fail. https://claude.ai/code/session_01Bykkm6kE75wpwuiuL9MHny
All 39 tests now pass against the real bot token. Fixes from live run:
- Correct response shapes: get_webex_me returns {'user': {...}}, room
tools return {'room': {...}}, space aliases return {'space': {...}} /
{'spaces': [...]}
- Space alias tools take space_id param (not room_id) and rename keys
- build_webex_adaptive_card returns raw {'card_body', 'card_actions'}
dict (not a success/error wrapper); corrected signature (body_text,
not text) and test assertions
- send_webex_adaptive_card takes card_body/card_actions kwargs; spread
build output directly with **card
- list_webex_messages returns E403 for bots in group spaces (Webex
enforces this for all bot tokens); test accepts either success or
structured error
- Bot is not automatically a moderator of rooms it creates; weaken
assertion to membership presence only
- FactSet is nested inside Container in card_body; traverse items
https://claude.ai/code/session_01Bykkm6kE75wpwuiuL9MHny
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
39 tests covering the complete tool surface against a real Webex bot
token. All tests are skipped automatically during normal CI runs and
opt-in via WEBEX_INTEGRATION_TESTS=1 + WEBEX_ACCESS_TOKEN to prevent
unit-test mock interference.
Coverage:
missing required parameters across all tool categories
Each class manages its own tearDownClass cleanup so resources are
deleted even when individual tests fail.
https://claude.ai/code/session_01Bykkm6kE75wpwuiuL9MHny