Skip to content

Commit 6a2444d

Browse files
committed
Make testid1 easier to use, update examples
1 parent 55229a7 commit 6a2444d

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

locustfile.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ def ask_question(self):
1717
"messages": [
1818
{
1919
"content": random.choice(
20-
["Best shoe for hiking?", "Climbing shoe cheaper than $30?", "Waterproof camping gear?"]
20+
[
21+
"Good spot to grab a quick coffee in morning?",
22+
"Inexpensive Chinese restaurants for 8 people?",
23+
"Can you recommend a highly rated Japanese restaurant?",
24+
]
2125
),
2226
"role": "user",
2327
}
@@ -32,7 +36,7 @@ def ask_question(self):
3236
"/chat",
3337
json={
3438
"messages": [
35-
{"content": "Best shoe for hiking?", "role": "user"},
39+
{"content": "Good spot to grab a quick coffee in morning?", "role": "user"},
3640
{
3741
"content": "For the best shoe for hiking, I recommend the Trailblaze Steel-Blue Hiking Shoes.",
3842
"role": "assistant",

src/backend/fastapi_app/seed_data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
{
3-
"id": "XDqSIoVRrG4JoF79HTT1Zw",
3+
"id": "testid1",
44
"name": "Balvanera",
55
"cuisine": "Argentine, Wine Bars, Steakhouses",
66
"rating": 4.5,

src/frontend/src/components/Example/ExampleList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import styles from "./Example.module.css";
44

55
const DEFAULT_EXAMPLES: string[] = [
66
"Good spot to grab a quick coffee in morning?",
7-
"Inexpensive chinese restaurants for 8-people?",
8-
"4-star Japanese restaurant for a couple people?",
7+
"Inexpensive Chinese restaurants for 8 people?",
8+
"Can you recommend a highly rated Japanese restaurant?",
99
];
1010

1111
interface Props {

tests/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class TestData(ItemPublic):
66

77

88
test_data = TestData(
9-
id="XDqSIoVRrG4JoF79HTT1Zw",
9+
id="testid1",
1010
name="Balvanera",
1111
cuisine="Argentine, Wine Bars, Steakhouses",
1212
rating=4.5,

tests/test_api_routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async def test_item_handler_404(test_client):
3737
@pytest.mark.asyncio
3838
async def test_similar_handler(test_client):
3939
"""test the similar_handler route"""
40-
response = test_client.get("/similar?id=XDqSIoVRrG4JoF79HTT1Zw&n=1")
40+
response = test_client.get("/similar?id=testid1&n=1")
4141

4242
assert response.status_code == 200
4343
assert response.headers["Content-Type"] == "application/json"

0 commit comments

Comments
 (0)