test: add integration tests for Teams Python SDK#475
Merged
Conversation
12 tests covering activities, members, conversations, teams, and reactions. Uses azure-identity for auth and pytest-asyncio for async test support. 1 test skipped (TeamDetails.type model bug — service omits required field). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
⚠️ Not ready to approve
New integration test files contain Ruff-blocking formatting issues and the test harness/docs need small fixes (HTTP client cleanup and env-loading instructions) to be reliable.
Pull request overview
Adds a new tests/integration/ suite intended to validate the Python Teams SDK against the real Bot Framework service, and adjusts the API model to match a field the service may omit.
Changes:
- Add 12 async integration tests (activities, members, conversations, teams, reactions) plus shared fixture/config/docs under
tests/integration/. - Introduce an
integrationdependency group (azure-identity, python-dotenv) for running the new tests. - Fix
TeamDetails.typeto be optional to match service responses.
File summaries
| File | Description |
|---|---|
| uv.lock | Adds the integration dependency group and locks new dependencies. |
| pyproject.toml | Declares the integration dependency group for workspace installs. |
| packages/api/src/microsoft_teams/api/models/team_details.py | Makes TeamDetails.type optional to reflect service behavior. |
| CONTRIBUTING.md | Documents when/why to add integration tests and how to run them. |
| .gitignore | Ignores .env.* secrets while explicitly keeping .env.example tracked. |
| tests/integration/conftest.py | Provides async auth/config fixture and member caching for integration tests. |
| tests/integration/test_activities.py | Adds activity create/update/reply/delete integration tests. |
| tests/integration/test_members.py | Adds conversation member get/get_all/get_paged integration tests. |
| tests/integration/test_conversations.py | Adds 1:1 and group conversation creation integration tests. |
| tests/integration/test_teams_and_reactions.py | Adds team detail/channel tests and reaction add/delete test. |
| tests/integration/README.md | Adds local setup/run documentation for the integration suite. |
| tests/integration/pytest.ini | Adds pytest config for asyncio mode within the integration test folder. |
| tests/integration/.env.example | Adds an env template for required integration credentials/IDs. |
Copilot's findings
- Files reviewed: 11/13 changed files
- Comments generated: 12
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
heyitsaamir
reviewed
Jun 16, 2026
heyitsaamir
approved these changes
Jun 16, 2026
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.
Adds 12 integration tests that make real API calls against the Teams Bot Framework service.
Tests:
Also fixes:
TeamDetails.typewas incorrectly marked as required — service doesn't always return it. NowOptional.Setup:
See cross-SDK runbook for provisioning and troubleshooting.