Skip to content

Commit d86d7e6

Browse files
committed
push
1 parent 1cd9452 commit d86d7e6

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

tests/test_core_sdk.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,12 @@ def test_create_numeric_score():
161161
# Retrieve and verify
162162
trace = api_wrapper.get_trace(trace_id)
163163

164-
assert trace["scores"][0]["id"] == score_id
165-
assert trace["scores"][0]["value"] == 1
166-
assert trace["scores"][0]["dataType"] == "NUMERIC"
167-
assert trace["scores"][0]["stringValue"] is None
164+
# Find the score by name (server may transform the ID format)
165+
score = next((s for s in trace["scores"] if s["name"] == "this-is-a-score"), None)
166+
assert score is not None
167+
assert score["value"] == 1
168+
assert score["dataType"] == "NUMERIC"
169+
assert score["stringValue"] is None
168170

169171

170172
def test_create_boolean_score():

0 commit comments

Comments
 (0)