mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
test(router): update error message assertion after string concat optimization
Update test_generate_model_id_with_deployment_model_name to accept the new error message format that results from the list+join optimization. The function still correctly rejects None values with a TypeError, but the error message changed from 'unsupported operand type(s) for +=' to 'expected str instance, NoneType found' due to the implementation change from string concatenation to list joining.
This commit is contained in:
parent
c98a30a4b6
commit
97ed3d01ec
1 changed files with 2 additions and 1 deletions
|
|
@ -1411,7 +1411,8 @@ def test_generate_model_id_with_deployment_model_name(model_list):
|
|||
"Expected TypeError when model_group is None - this confirms our fix is needed"
|
||||
)
|
||||
except TypeError as e:
|
||||
assert "unsupported operand type(s) for +=" in str(e)
|
||||
# After optimization, error message changed but still fails appropriately on None
|
||||
assert "unsupported operand type(s) for +=" in str(e) or "expected str instance, NoneType found" in str(e)
|
||||
print(f"✓ Correctly failed with None model_group (as expected): {e}")
|
||||
except Exception as e:
|
||||
pytest.fail(f"Unexpected error with None model_group: {e}")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue