Skip to content

Commit eddaf1e

Browse files
authored
fix: test_prepend_prompt_with_mixed_variables mock (#4979)
1 parent 0e3b5e1 commit eddaf1e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/unit/providers/agents/meta_reference/test_openai_responses.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,15 +1687,17 @@ async def test_prepend_prompt_with_mixed_variables(openai_responses_impl, mock_p
16871687
mock_image_content = b"fake_image_data"
16881688
mock_file_content = b"fake_doc_content"
16891689

1690-
async def mock_retrieve_file_content(file_id):
1690+
async def mock_retrieve_file_content(request):
1691+
file_id = request.file_id
16911692
if file_id == "file-photo-123":
16921693
return type("obj", (object,), {"body": mock_image_content})()
16931694
elif file_id == "file-doc-456":
16941695
return type("obj", (object,), {"body": mock_file_content})()
16951696

16961697
mock_files_api.openai_retrieve_file_content.side_effect = mock_retrieve_file_content
16971698

1698-
def mock_retrieve_file(file_id):
1699+
def mock_retrieve_file(request):
1700+
file_id = request.file_id
16991701
if file_id == "file-photo-123":
17001702
return OpenAIFileObject(
17011703
object="file",

0 commit comments

Comments
 (0)