Skip to content

Commit afc8d1b

Browse files
committed
Update e2e test
1 parent f4b0182 commit afc8d1b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/e2e.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ def test_chat(sized_page: Page, live_server_url: str):
9090

9191
# Set up a mock route to the /chat endpoint with streaming results
9292
def handle(route: Route):
93-
# Assert that session_state is specified in the request (None for now)
93+
# Assert that session_state is specified in the request
9494
session_state = route.request.post_data_json["session_state"]
95-
assert session_state is None
95+
# Assert session state is a random UUID generated from crypto.randomUUID()
96+
assert session_state is not None
97+
assert len(session_state) == 36
9698
# Read the JSONL from our snapshot results and return as the response
9799
f = open("tests/snapshots/test_app/test_chat_stream_text/client0/result.jsonlines")
98100
jsonl = f.read()

0 commit comments

Comments
 (0)