Skip to content

Commit 6af4433

Browse files
r3v5claude
andcommitted
test(responses): add status transition test and remove Meta copyright
Address PR review feedback: - Add test asserting that OpenAIResponseOutputMessageFunctionToolCall status transitions from in_progress to completed while preserving the same id via model_copy. - Remove Meta Platforms copyright block from test file. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Ian Miller <milleryan2003@gmail.com>
1 parent 64ac209 commit 6af4433

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

tests/unit/providers/responses/builtin/test_openai_response_model_fields.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
# This source code is licensed under the terms described in the LICENSE file in
55
# the root directory of this source tree.
66

7-
# Copyright (c) Meta Platforms, Inc. and affiliates.
8-
# All rights reserved.
9-
#
10-
# This source code is licensed under the terms described in the LICENSE file in
11-
# the root directory of this source tree.
12-
137
"""Tests that id and status fields are always str (never None) on response models."""
148

159
import pytest
@@ -78,6 +72,13 @@ def test_none_status_rejected(self):
7872
with pytest.raises(ValidationError):
7973
OpenAIResponseOutputMessageFunctionToolCall(call_id="call_123", name="func", arguments="{}", status=None)
8074

75+
def test_status_transition_preserves_id(self):
76+
tc = OpenAIResponseOutputMessageFunctionToolCall(call_id="call_123", name="func", arguments="{}")
77+
assert tc.status == "in_progress"
78+
completed = tc.model_copy(update={"status": "completed"})
79+
assert completed.status == "completed"
80+
assert completed.id == tc.id
81+
8182

8283
class TestOpenAIResponseInputFunctionToolCallOutputFields:
8384
def test_default_id_is_str(self):

0 commit comments

Comments
 (0)