Skip to content

Commit 5cc84ac

Browse files
committed
test: Fix endpoint in tests
Branch: RemoveToggle Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
1 parent 816d7d6 commit 5cc84ac

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

tests/commands/resources/test_a2a.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def test_a2a_toggle_from_disabled_to_enabled(self, mock_console) -> None:
253253
# Verify second call was POST with activate=True
254254
post_call = mock_req.call_args_list[1]
255255
assert post_call[0][0] == "POST"
256-
assert post_call[0][1] == "/a2a/1/toggle"
256+
assert post_call[0][1] == "/a2a/1/state"
257257
assert post_call[1]["params"]["activate"] is True
258258

259259
def test_a2a_toggle_from_enabled_to_disabled(self, mock_console) -> None:
@@ -276,7 +276,7 @@ def test_a2a_toggle_from_enabled_to_disabled(self, mock_console) -> None:
276276
# Verify second call was POST with activate=False
277277
post_call = mock_req.call_args_list[1]
278278
assert post_call[0][0] == "POST"
279-
assert post_call[0][1] == "/a2a/1/toggle"
279+
assert post_call[0][1] == "/a2a/1/state"
280280
assert post_call[1]["params"]["activate"] is False
281281

282282
def test_a2a_toggle_detects_current_status(self, mock_console) -> None:

tests/commands/resources/test_mcp_servers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def test_mcp_servers_toggle_from_disabled_to_enabled(self, mock_console) -> None
233233
# Verify second call was POST with activate=True
234234
post_call = mocks.make_authenticated_request.call_args_list[1]
235235
assert post_call[0][0] == "POST"
236-
assert post_call[0][1] == "/gateways/test-server-123/toggle"
236+
assert post_call[0][1] == "/gateways/test-server-123/state"
237237
assert post_call[1]["params"]["activate"] is True
238238

239239
def test_mcp_servers_toggle_from_enabled_to_disabled(self, mock_console) -> None:
@@ -263,7 +263,7 @@ def test_mcp_servers_toggle_from_enabled_to_disabled(self, mock_console) -> None
263263
# Verify second call was POST with activate=False
264264
post_call = mocks.make_authenticated_request.call_args_list[1]
265265
assert post_call[0][0] == "POST"
266-
assert post_call[0][1] == "/gateways/test-server-123/toggle"
266+
assert post_call[0][1] == "/gateways/test-server-123/state"
267267
assert post_call[1]["params"]["activate"] is False
268268

269269
def test_mcp_servers_toggle_detects_current_status(self, mock_console) -> None:

tests/commands/resources/test_prompts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def test_prompts_toggle_from_inactive_to_active(self, mock_console) -> None:
234234
# Verify second call was POST with activate=True
235235
post_call = mocks.make_authenticated_request.call_args_list[1]
236236
assert post_call[0][0] == "POST"
237-
assert post_call[0][1] == "/prompts/one/toggle"
237+
assert post_call[0][1] == "/prompts/one/state"
238238
assert post_call[1]["params"]["activate"] is True
239239

240240
def test_prompts_toggle_from_active_to_inactive(self, mock_console) -> None:
@@ -262,7 +262,7 @@ def test_prompts_toggle_from_active_to_inactive(self, mock_console) -> None:
262262
# Verify second call was POST with activate=False
263263
post_call = mocks.make_authenticated_request.call_args_list[1]
264264
assert post_call[0][0] == "POST"
265-
assert post_call[0][1] == "/prompts/one/toggle"
265+
assert post_call[0][1] == "/prompts/one/state"
266266
assert post_call[1]["params"]["activate"] is False
267267

268268
def test_prompts_toggle_detects_current_status(self, mock_console) -> None:

tests/commands/resources/test_resources.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def test_resources_toggle_from_inactive_to_active(self, mock_console) -> None:
259259
# Verify second call was POST with activate=True
260260
post_call = mock_req.call_args_list[1]
261261
assert post_call[0][0] == "POST"
262-
assert post_call[0][1] == "/resources/one/toggle"
262+
assert post_call[0][1] == "/resources/one/state"
263263
assert post_call[1]["params"]["activate"] is True
264264

265265
def test_resources_toggle_from_active_to_inactive(self, mock_console) -> None:
@@ -283,7 +283,7 @@ def test_resources_toggle_from_active_to_inactive(self, mock_console) -> None:
283283
# Verify second call was POST with activate=False
284284
post_call = mock_req.call_args_list[1]
285285
assert post_call[0][0] == "POST"
286-
assert post_call[0][1] == "/resources/one/toggle"
286+
assert post_call[0][1] == "/resources/one/state"
287287
assert post_call[1]["params"]["activate"] is False
288288

289289
def test_resources_toggle_detects_current_status(self, mock_console) -> None:

tests/commands/resources/test_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def test_tools_toggle_from_disabled_to_enabled(self, mock_console) -> None:
197197
# Verify second call was POST with activate=True
198198
post_call = mock_req.call_args_list[1]
199199
assert post_call[0][0] == "POST"
200-
assert post_call[0][1] == "/tools/1/toggle"
200+
assert post_call[0][1] == "/tools/1/state"
201201
assert post_call[1]["params"]["activate"] is True
202202

203203
def test_tools_toggle_from_enabled_to_disabled(self, mock_console) -> None:
@@ -220,7 +220,7 @@ def test_tools_toggle_from_enabled_to_disabled(self, mock_console) -> None:
220220
# Verify second call was POST with activate=False
221221
post_call = mock_req.call_args_list[1]
222222
assert post_call[0][0] == "POST"
223-
assert post_call[0][1] == "/tools/1/toggle"
223+
assert post_call[0][1] == "/tools/1/state"
224224
assert post_call[1]["params"]["activate"] is False
225225

226226
def test_tools_toggle_detects_current_status(self, mock_console) -> None:

tests/commands/resources/test_virtual_servers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def test_virtual_servers_toggle_from_inactive_to_active(self, mock_console) -> N
231231
# Verify second call was POST with activate=True
232232
post_call = mock_req.call_args_list[1]
233233
assert post_call[0][0] == "POST"
234-
assert post_call[0][1] == "/servers/vs-123/toggle"
234+
assert post_call[0][1] == "/servers/vs-123/state"
235235
assert post_call[1]["params"]["activate"] is True
236236

237237
def test_virtual_servers_toggle_from_active_to_inactive(self, mock_console) -> None:
@@ -254,7 +254,7 @@ def test_virtual_servers_toggle_from_active_to_inactive(self, mock_console) -> N
254254
# Verify second call was POST with activate=False
255255
post_call = mock_req.call_args_list[1]
256256
assert post_call[0][0] == "POST"
257-
assert post_call[0][1] == "/servers/vs-123/toggle"
257+
assert post_call[0][1] == "/servers/vs-123/state"
258258
assert post_call[1]["params"]["activate"] is False
259259

260260
def test_virtual_servers_toggle_detects_current_status(self, mock_console) -> None:

0 commit comments

Comments
 (0)