mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
test(integration): use rc 108 database read helper
This commit is contained in:
parent
b5049a43ce
commit
c86300491f
1 changed files with 2 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ from typing import Final
|
|||
import pytest
|
||||
import yaml
|
||||
from integration._support.client import Gateway, eventually, gateway_from_environment, list_value, object_value
|
||||
from integration._support.database import read_rows
|
||||
from integration._support.process import owned_proxy_process
|
||||
from integration._support.wire import Reply, Request, Wire, wire_server
|
||||
from pydantic import BaseModel, ConfigDict, JsonValue, TypeAdapter
|
||||
|
|
@ -479,7 +480,7 @@ def _ask(rig: Rig, model: str, surface: Surface, guardrail: str, prompt: str) ->
|
|||
|
||||
def _spend_row(rig: Rig, model: str) -> dict[str, JsonValue]:
|
||||
rows: Final = eventually(
|
||||
lambda: rig.gateway.rows('SELECT response, metadata FROM "LiteLLM_SpendLogs" WHERE model_group = %s', (model,)),
|
||||
lambda: read_rows('SELECT response, metadata FROM "LiteLLM_SpendLogs" WHERE model_group = %s', (model,)),
|
||||
lambda found: len(found) == 1,
|
||||
seconds=70,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue