Skip to content

Remove unnecessary Agent class patches from googleadk extension tests#169

Merged
JesuTerraz merged 2 commits intousers/jterrazas/google-adk-supportfrom
copilot/sub-pr-156
Feb 6, 2026
Merged

Remove unnecessary Agent class patches from googleadk extension tests#169
JesuTerraz merged 2 commits intousers/jterrazas/google-adk-supportfrom
copilot/sub-pr-156

Conversation

Copy link
Contributor

Copilot AI commented Feb 6, 2026

Two test methods were patching the Agent class despite the implementation never instantiating or directly referencing it—only using the passed-in agent parameter.

Changes

  • Removed Agent patch from test_add_tool_servers_exchanges_token_when_not_provided
  • Removed Agent patch from test_add_tool_servers_uses_provided_token

The Agent class is imported for type hints but not used as a symbol in the implementation:

# Implementation only uses the agent parameter, never Agent symbol
async def add_tool_servers_to_agent(
    self,
    agent: Agent,  # Type hint only
    auth: Authorization,
    ...
) -> None:
    # Uses agent.tools, never instantiates Agent
    agent.tools = list(agent.tools) + mcp_servers_info

This reduces unnecessary mocking surface and clarifies actual test dependencies.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: JesuTerraz <96103167+JesuTerraz@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 6, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: /usr/bin/curl curl -LsSf REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add Google ADK tooling extension to Agent365 SDK Remove unnecessary Agent class patches from googleadk extension tests Feb 6, 2026
Copilot AI requested a review from JesuTerraz February 6, 2026 22:51
@JesuTerraz JesuTerraz marked this pull request as ready for review February 6, 2026 22:52
@JesuTerraz JesuTerraz requested a review from a team as a code owner February 6, 2026 22:52
@JesuTerraz JesuTerraz merged commit b70d99d into users/jterrazas/google-adk-support Feb 6, 2026
1 check passed
@JesuTerraz JesuTerraz deleted the copilot/sub-pr-156 branch February 6, 2026 22:54
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