mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
fix: mock prisma_client in internal user get-agent-by-id test
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
This commit is contained in:
parent
f0c22559bd
commit
e0eda3d981
1 changed files with 4 additions and 3 deletions
|
|
@ -294,9 +294,10 @@ class TestAgentRBACInternalUser:
|
|||
self.mock_registry.get_agent_by_id = MagicMock(
|
||||
return_value=_sample_agent_response()
|
||||
)
|
||||
resp = self.internal_client.get(
|
||||
"/v1/agents/agent-123", headers={"Authorization": "Bearer k"}
|
||||
)
|
||||
with patch("litellm.proxy.proxy_server.prisma_client") as mock_prisma:
|
||||
resp = self.internal_client.get(
|
||||
"/v1/agents/agent-123", headers={"Authorization": "Bearer k"}
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
|
||||
def test_should_block_internal_user_from_creating_agent(self):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue