Remove trailing slash in unit tests (#1535)

This commit is contained in:
Jeremiah Lowin 2025-08-18 08:10:46 -04:00 committed by GitHub
commit ce0a044835
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 6 deletions

View file

@ -42,7 +42,7 @@ def run_server(host: str, port: int, **kwargs) -> None:
@pytest.fixture(scope="module")
def streamable_http_server() -> Generator[str, None, None]:
with run_server_in_process(run_server, transport="http") as url:
yield f"{url}/mcp/"
yield f"{url}/mcp"
@pytest.fixture()

View file

@ -70,7 +70,7 @@ def run_server(host: str, port: int, **kwargs) -> None:
@pytest.fixture(autouse=True, scope="module")
def sse_server() -> Generator[str, None, None]:
with run_server_in_process(run_server, transport="sse") as url:
yield f"{url}/sse/"
yield f"{url}/sse"
async def test_ping(sse_server: str):

View file

@ -62,7 +62,7 @@ def mcp_server_url(rsa_key_pair: RSAKeyPair) -> Generator[str]:
public_key=rsa_key_pair.public_key,
run_kwargs=dict(transport="http"),
) as url:
yield f"{url}/mcp/"
yield f"{url}/mcp"
class TestRSAKeyPair:

View file

@ -27,7 +27,7 @@ def run_mcp_server(host: str, port: int) -> None:
@pytest.fixture(scope="module")
def mcp_server_url() -> Generator[str]:
with run_server_in_process(run_mcp_server) as url:
yield f"{url}/mcp/"
yield f"{url}/mcp"
@pytest.fixture()

View file

@ -45,13 +45,13 @@ def run_server(host: str, port: int, **kwargs) -> None:
@pytest.fixture(autouse=True, scope="module")
def shttp_server() -> Generator[str, None, None]:
with run_server_in_process(run_server, transport="http") as url:
yield f"{url}/mcp/"
yield f"{url}/mcp"
@pytest.fixture(autouse=True, scope="module")
def sse_server() -> Generator[str, None, None]:
with run_server_in_process(run_server, transport="sse") as url:
yield f"{url}/sse/"
yield f"{url}/sse"
async def test_http_headers_resource_shttp(shttp_server: str):