From fa1eda878c53f4526e75f919d1b36013a28bee77 Mon Sep 17 00:00:00 2001 From: Eric Zawadski Date: Thu, 16 Jan 2025 12:50:06 -0800 Subject: [PATCH] fix(backend): missed test in refactor --- src/backend/crud/agent.py | 2 +- src/backend/tests/integration/routers/test_deployment.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/crud/agent.py b/src/backend/crud/agent.py index 4eaa3c58ea..8dd34c5727 100644 --- a/src/backend/crud/agent.py +++ b/src/backend/crud/agent.py @@ -140,7 +140,7 @@ def update_agent( if agent.is_private and agent.user_id != user_id: return None - new_agent_cleaned = new_agent.dict(exclude_unset=True, exclude_none=True) + new_agent_cleaned = new_agent.model_dump(exclude_unset=True, exclude_none=True) for attr, value in new_agent_cleaned.items(): setattr(agent, attr, value) diff --git a/src/backend/tests/integration/routers/test_deployment.py b/src/backend/tests/integration/routers/test_deployment.py index 4ffd5f7af6..6df4d29a1a 100644 --- a/src/backend/tests/integration/routers/test_deployment.py +++ b/src/backend/tests/integration/routers/test_deployment.py @@ -93,7 +93,7 @@ def test_list_deployments_no_available_models_404( session_client: TestClient, session: Session ) -> None: session.query(Deployment).delete() - with patch("backend.services.deployment.AVAILABLE_MODEL_DEPLOYMENTS", []): + with patch("backend.services.deployment.AVAILABLE_MODEL_DEPLOYMENTS", {}): response = session_client.get("/v1/deployments") assert response.status_code == 404 assert response.json() == {