Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion stepstone_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,9 @@ async def handle_call_tool(name: str, arguments: dict) -> list[types.TextContent
formatted_output.append(f"\n--- Results for '{term}' ---")

if not jobs:
formatted_output.append("No jobs found for this search term.")
formatted_output.append(
"No jobs found for this search term. Try refining your search terms or expanding the radius."
)
else:
for i, job in enumerate(jobs, 1):
formatted_output.append(f"\n{i}. {job['title']}")
Expand Down
8 changes: 4 additions & 4 deletions tests/test_handle_call_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_handle_call_tool_search_jobs_empty_results(monkeypatch):
text = response[0].text
assert "Total Jobs Found: 0" in text
assert "No jobs found for this search term." in text
assert "Try adjusting your search terms" in text
assert "Try refining your search terms or expanding the radius." in text


def test_handle_call_tool_search_jobs_error(monkeypatch):
Expand Down Expand Up @@ -98,7 +98,7 @@ def test_handle_call_tool_get_job_details_success(monkeypatch):

response = asyncio.run(handle_call_tool(
"get_job_details",
{"job_query": "Fraud Analyst", "session_id": session_id},
{"query": "Fraud Analyst", "session_id": session_id},
))

text = response[0].text
Expand All @@ -123,7 +123,7 @@ def test_handle_call_tool_get_job_details_no_match(monkeypatch):

response = asyncio.run(handle_call_tool(
"get_job_details",
{"job_query": "Data Scientist", "session_id": list(session_manager.sessions.keys())[0]},
{"query": "Data Scientist", "session_id": list(session_manager.sessions.keys())[0]},
))

assert response[0].text == "No job found matching: Data Scientist"
Expand All @@ -145,7 +145,7 @@ def fail(self, url):

response = asyncio.run(handle_call_tool(
"get_job_details",
{"job_query": "Fraud Analyst", "session_id": session_id},
{"query": "Fraud Analyst", "session_id": session_id},
))

assert "Error retrieving job details: parse failure" in response[0].text
2 changes: 1 addition & 1 deletion tests/test_stepstone_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def fake_create_session(results, *args, **kwargs):

assert "Total Jobs Found: 0" in message
assert "No jobs found for this search term." in message
assert "refining your search terms" in message
assert "Try refining your search terms or expanding the radius." in message

assert any("returned no results" in record.getMessage() for record in caplog.records)