mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
test_dynamic_azure_params
This commit is contained in:
parent
55ea2370ba
commit
c010cdef59
1 changed files with 5 additions and 5 deletions
|
@ -4364,14 +4364,14 @@ async def test_dynamic_azure_params(stream, sync_mode):
|
|||
|
||||
## recreate mock client
|
||||
if sync_mode:
|
||||
mock_client = MagicMock(return_value="Hello world!")
|
||||
new_mock_client = MagicMock(return_value="Hello world!")
|
||||
else:
|
||||
mock_client = AsyncMock(return_value="Hello world!")
|
||||
new_mock_client = AsyncMock(return_value="Hello world!")
|
||||
|
||||
## CHECK IF NEW CLIENT IS USED (PARAM CHANGE)
|
||||
with patch.object(
|
||||
client.chat.completions.with_raw_response, "create", new=mock_client
|
||||
) as mock_client:
|
||||
client.chat.completions.with_raw_response, "create", new=new_mock_client
|
||||
) as new_mock_client:
|
||||
try:
|
||||
if sync_mode:
|
||||
_ = completion(
|
||||
|
@ -4393,7 +4393,7 @@ async def test_dynamic_azure_params(stream, sync_mode):
|
|||
pass
|
||||
|
||||
try:
|
||||
mock_client.assert_not_called()
|
||||
new_mock_client.assert_called()
|
||||
except Exception as e:
|
||||
raise e
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue