Skip to content

Commit 3c3bdee

Browse files
committed
test: fix coverage for unused resource functions
The resource functions are only used for metadata validation, not actually called in these tests.
1 parent 96445eb commit 3c3bdee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/issues/test_1754_mime_type_parameters.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async def test_mime_type_with_parameters():
2222
# This should NOT raise a validation error
2323
@mcp.resource("ui://widget", mime_type="text/html;profile=mcp-app")
2424
def widget() -> str:
25-
return "<html>widget</html>"
25+
raise NotImplementedError()
2626

2727
resources = await mcp.list_resources()
2828
assert len(resources) == 1
@@ -35,7 +35,7 @@ async def test_mime_type_with_parameters_and_space():
3535

3636
@mcp.resource("data://json", mime_type="application/json; charset=utf-8")
3737
def data() -> str:
38-
return "{}"
38+
raise NotImplementedError()
3939

4040
resources = await mcp.list_resources()
4141
assert len(resources) == 1
@@ -48,7 +48,7 @@ async def test_mime_type_with_multiple_parameters():
4848

4949
@mcp.resource("data://multi", mime_type="text/plain; charset=utf-8; format=fixed")
5050
def data() -> str:
51-
return "data"
51+
raise NotImplementedError()
5252

5353
resources = await mcp.list_resources()
5454
assert len(resources) == 1

0 commit comments

Comments
 (0)