We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72d1866 commit 761f0a7Copy full SHA for 761f0a7
1 file changed
tests/unittests/integrations/agent_registry/test_agent_registry.py
@@ -42,8 +42,14 @@ class TestAgentRegistry:
42
def registry(self):
43
mock_creds = MagicMock()
44
mock_creds.quota_project_id = None
45
- with patch("google.auth.default", return_value=(mock_creds, "project-id")):
46
- return AgentRegistry(project_id="test-project", location="global")
+ with patch(
+ "google.auth.default", return_value=(mock_creds, "project-id")
47
+ ), patch(
48
+ "google.auth.transport.requests.AuthorizedSession"
49
+ ) as mock_session_class:
50
+ registry = AgentRegistry(project_id="test-project", location="global")
51
+ registry._mock_session = mock_session_class.return_value
52
+ return registry
53
54
@pytest.mark.asyncio
55
@patch("google.auth.transport.requests.AuthorizedSession")
0 commit comments