Skip to content

Commit 05b2a53

Browse files
committed
fixed testcase
Signed-off-by: Veeresh K <[email protected]>
1 parent 8c79507 commit 05b2a53

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/unit/mcpgateway/test_translate_stdio_endpoint.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
Tests for StdIOEndpoint class modifications to support dynamic environment variables.
1010
"""
11-
11+
import sys
1212
import asyncio
1313
import pytest
1414
import tempfile
@@ -248,15 +248,17 @@ async def test_stop_after_start(self, echo_script):
248248
async def test_multiple_env_vars(self, test_script):
249249
"""Test with multiple environment variables."""
250250
pubsub = _PubSub()
251-
env_vars = {
251+
252+
env_vars = os.environ.copy()
253+
env_vars.update({
252254
"GITHUB_TOKEN": "github-token-123",
253255
"TENANT_ID": "acme-corp",
254256
"API_KEY": "api-key-456",
255257
"ENVIRONMENT": "production",
256258
"DEBUG": "false",
257-
}
259+
})
258260

259-
endpoint = StdIOEndpoint(f"python3 {test_script}", pubsub, env_vars)
261+
endpoint = StdIOEndpoint(f"{sys.executable} {test_script}", pubsub, env_vars)
260262
await endpoint.start()
261263

262264
try:

0 commit comments

Comments
 (0)