Skip to content

Commit

Permalink
Add testing for invalid parameters (#172)
Browse files Browse the repository at this point in the history
- Add testing for invalid parameters when creating a Sydney client
  • Loading branch information
vsakkas authored May 12, 2024
1 parent 385802c commit 2c95bef
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/test_ask.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ async def test_ask_travel_persona() -> bool:


@pytest.mark.asyncio
async def test_ask_travel_cooking() -> bool:
async def test_ask_cooking_persona() -> bool:
expected_responses = [
"Hello! This is Cooking Assistant. How can I assist you today? 😊",
"Hello! This is Cooking Assistant. How can I assist you in the kitchen today? 😊",
Expand All @@ -308,7 +308,7 @@ async def test_ask_travel_cooking() -> bool:


@pytest.mark.asyncio
async def test_ask_travel_fitness() -> bool:
async def test_ask_fitness_persona() -> bool:
expected_responses = [
"Hello! How can I assist you with your fitness journey today? 😊",
"Hello! This is Fitness Trainer. How can I assist you today? 😊",
Expand All @@ -325,3 +325,10 @@ async def test_ask_travel_fitness() -> bool:
return True

assert False, f"Unexpected response: {response}, match score: {score}"


@pytest.mark.asyncio
async def test_ask_invalid_style() -> None:
with pytest.raises(KeyError):
async with SydneyClient(style="invalid") as sydney:
_ = await sydney.ask("Hello, Copilot!")

0 comments on commit 2c95bef

Please sign in to comment.