|
|
@@ -36,7 +36,7 @@ class TestToolsMcpIntegration:
|
|
|
client_rest.execute.assert_called_once_with(
|
|
|
method=HTTPMethod.POST,
|
|
|
endpoint="/rest/tools/resource",
|
|
|
- params={"pagetitle": "Test Resource"},
|
|
|
+ json={"pagetitle": "Test Resource"},
|
|
|
)
|
|
|
|
|
|
async def test_update_resource(self, mcp_session: ClientSession, client_rest: MagicMock) -> None:
|
|
|
@@ -56,7 +56,7 @@ class TestToolsMcpIntegration:
|
|
|
client_rest.execute.assert_called_once_with(
|
|
|
method=HTTPMethod.PUT,
|
|
|
endpoint="/rest/tools/resource",
|
|
|
- params={"id": 1, "pagetitle": "Updated Resource"},
|
|
|
+ json={"id": 1, "pagetitle": "Updated Resource"},
|
|
|
)
|
|
|
|
|
|
async def test_delete_resource(self, mcp_session: ClientSession, client_rest: MagicMock) -> None:
|
|
|
@@ -76,7 +76,7 @@ class TestToolsMcpIntegration:
|
|
|
client_rest.execute.assert_called_once_with(
|
|
|
method=HTTPMethod.DELETE,
|
|
|
endpoint="/rest/tools/resource",
|
|
|
- params={"id": 1},
|
|
|
+ json={"id": 1},
|
|
|
)
|
|
|
|
|
|
async def test_create_template(self, mcp_session: ClientSession, client_rest: MagicMock) -> None:
|
|
|
@@ -98,7 +98,7 @@ class TestToolsMcpIntegration:
|
|
|
client_rest.execute.assert_called_once_with(
|
|
|
method=HTTPMethod.POST,
|
|
|
endpoint="/rest/tools/template",
|
|
|
- params={"name": "Test Template"},
|
|
|
+ json={"name": "Test Template"},
|
|
|
)
|
|
|
|
|
|
async def test_update_template(self, mcp_session: ClientSession, client_rest: MagicMock) -> None:
|
|
|
@@ -118,7 +118,7 @@ class TestToolsMcpIntegration:
|
|
|
client_rest.execute.assert_called_once_with(
|
|
|
method=HTTPMethod.PUT,
|
|
|
endpoint="/rest/tools/template",
|
|
|
- params={"id": 1, "name": "Updated Template"},
|
|
|
+ json={"id": 1, "name": "Updated Template"},
|
|
|
)
|
|
|
|
|
|
async def test_create_tv(self, mcp_session: ClientSession, client_rest: MagicMock) -> None:
|
|
|
@@ -140,7 +140,7 @@ class TestToolsMcpIntegration:
|
|
|
client_rest.execute.assert_called_once_with(
|
|
|
method=HTTPMethod.POST,
|
|
|
endpoint="/rest/tools/tv",
|
|
|
- params={"name": "Test TV"},
|
|
|
+ json={"name": "Test TV"},
|
|
|
)
|
|
|
|
|
|
async def test_update_tv(self, mcp_session: ClientSession, client_rest: MagicMock) -> None:
|
|
|
@@ -160,7 +160,7 @@ class TestToolsMcpIntegration:
|
|
|
client_rest.execute.assert_called_once_with(
|
|
|
method=HTTPMethod.PUT,
|
|
|
endpoint="/rest/tools/tv",
|
|
|
- params={"id": 1, "name": "Updated TV"},
|
|
|
+ json={"id": 1, "name": "Updated TV"},
|
|
|
)
|
|
|
|
|
|
async def test_create_category(self, mcp_session: ClientSession, client_rest: MagicMock) -> None:
|
|
|
@@ -182,7 +182,7 @@ class TestToolsMcpIntegration:
|
|
|
client_rest.execute.assert_called_once_with(
|
|
|
method=HTTPMethod.POST,
|
|
|
endpoint="/rest/tools/category",
|
|
|
- params={"category": "Test Category"},
|
|
|
+ json={"category": "Test Category"},
|
|
|
)
|
|
|
|
|
|
async def test_update_category(self, mcp_session: ClientSession, client_rest: MagicMock) -> None:
|