mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-16 09:22:22 +00:00
test(router): cover dropped deployment cleanup
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
4c23d0d2c8
commit
4a6b7d09dc
1 changed files with 5 additions and 0 deletions
|
|
@ -1451,6 +1451,11 @@ class TestRouterComplexityDeploymentMethods:
|
|||
assert router.upsert_deployment(Deployment(**self._router_row("v2-b", "id-b", "heuristic"))) is not None
|
||||
assert "id-b" not in router.dropped_deployments
|
||||
|
||||
assert router.upsert_deployment(Deployment(**self._router_row("v2-b", "id-b", "heuristic_v2"))) is None
|
||||
assert "id-b" in router.dropped_deployments
|
||||
assert router.delete_deployment(id="id-b") is not None
|
||||
assert "id-b" not in router.dropped_deployments
|
||||
|
||||
def test_heuristic_v2_ceiling_raises_without_ignore_invalid_deployments(self) -> None:
|
||||
with pytest.raises(ValueError, match="At most 1 auto-router"):
|
||||
Router(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue