Skip to content

Commit bfb8eaa

Browse files
committed
test: remove OAS parser tests and update feedback tests
Remove tests that depended on OAS-based implementation: - tests/test_parser.py: OpenAPIParser unit tests - tests/test_toolset.py: get_tools/get_tool integration tests - tests/snapshots/: Snapshot files for parsed OAS specs Update tests/test_feedback.py: - test_tool_integration: Use create_feedback_tool directly instead of fetching via deprecated get_tools() method - test_live_feedback_submission: Same change for live test All remaining tests pass with the new MCP-based architecture.
1 parent 8a15c22 commit bfb8eaa

File tree

11 files changed

+5
-60279
lines changed

11 files changed

+5
-60279
lines changed

tests/snapshots/test_parser/test_parse_all_oas_specs/ats_tools.json

Lines changed: 0 additions & 8634 deletions
This file was deleted.

tests/snapshots/test_parser/test_parse_all_oas_specs/core_tools.json

Lines changed: 0 additions & 452 deletions
This file was deleted.

tests/snapshots/test_parser/test_parse_all_oas_specs/crm_tools.json

Lines changed: 0 additions & 899 deletions
This file was deleted.

tests/snapshots/test_parser/test_parse_all_oas_specs/documents_tools.json

Lines changed: 0 additions & 1778 deletions
This file was deleted.

tests/snapshots/test_parser/test_parse_all_oas_specs/hris_tools.json

Lines changed: 0 additions & 33327 deletions
This file was deleted.

tests/snapshots/test_parser/test_parse_all_oas_specs/iam_tools.json

Lines changed: 0 additions & 558 deletions
This file was deleted.

tests/snapshots/test_parser/test_parse_all_oas_specs/lms_tools.json

Lines changed: 0 additions & 11046 deletions
This file was deleted.

tests/snapshots/test_parser/test_parse_all_oas_specs/marketing_tools.json

Lines changed: 0 additions & 2571 deletions
This file was deleted.

tests/test_feedback.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,10 @@ def mock_request_side_effect(*args, **kwargs):
217217

218218
def test_tool_integration(self) -> None:
219219
"""Test that feedback tool integrates properly with toolset."""
220-
from stackone_ai import StackOneToolSet
220+
from stackone_ai.feedback import create_feedback_tool
221221

222222
with patch.dict("os.environ", {"STACKONE_API_KEY": "test_key"}):
223-
toolset = StackOneToolSet()
224-
tools = toolset.get_tools("meta_collect_tool_feedback")
225-
226-
feedback_tool = tools.get_tool("meta_collect_tool_feedback")
223+
feedback_tool = create_feedback_tool(api_key="test_key")
227224
assert feedback_tool is not None
228225
assert feedback_tool.name == "meta_collect_tool_feedback"
229226
assert "feedback" in feedback_tool.description.lower()
@@ -242,17 +239,15 @@ def test_live_feedback_submission() -> None:
242239
"""Submit feedback to the live API and assert a successful response."""
243240
import uuid
244241

242+
from stackone_ai.feedback import create_feedback_tool
243+
245244
api_key = os.getenv("STACKONE_API_KEY")
246245
if not api_key:
247246
pytest.skip("STACKONE_API_KEY env var required for live feedback test")
248247

249248
base_url = os.getenv("STACKONE_BASE_URL", "https://api.stackone.com")
250-
from stackone_ai import StackOneToolSet
251-
252-
toolset = StackOneToolSet(api_key=api_key, base_url=base_url)
253249

254-
tools = toolset.get_tools("meta_collect_tool_feedback")
255-
feedback_tool = tools.get_tool("meta_collect_tool_feedback")
250+
feedback_tool = create_feedback_tool(api_key=api_key, base_url=base_url)
256251
assert feedback_tool is not None, "Feedback tool must be available"
257252

258253
feedback_token = uuid.uuid4().hex[:8]

0 commit comments

Comments
 (0)