Skip to content

Commit ae1aa93

Browse files
Update api-server/tests/test_request_id_middleware.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent e46b6d3 commit ae1aa93

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

api-server/tests/test_request_id_middleware.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ def test_generates_uuid_when_missing(client):
2020
resp = client.get("/test")
2121
assert resp.status_code == 200
2222
rid = resp.headers["x-exosphere-request-id"]
23-
uuid.UUID(rid)
23+
# Validate that a proper UUID was generated
24+
parsed_uuid = uuid.UUID(rid)
25+
assert str(parsed_uuid) == rid
2426
assert resp.json() == {"msg": "ok"}
2527

2628
def test_preserves_valid_id(client):

0 commit comments

Comments
 (0)