mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
Merge 9255ac1179 into 55e9e4ce2f
This commit is contained in:
commit
02a925d932
4 changed files with 28 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ datasource client {
|
|||
|
||||
generator client {
|
||||
provider = "prisma-client-py"
|
||||
recursive_type_depth = -1
|
||||
binaryTargets = ["native", "debian-openssl-1.1.x", "debian-openssl-3.0.x", "linux-musl", "linux-musl-openssl-3.0.x"]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ datasource client {
|
|||
|
||||
generator client {
|
||||
provider = "prisma-client-py"
|
||||
recursive_type_depth = -1
|
||||
binaryTargets = ["native", "debian-openssl-1.1.x", "debian-openssl-3.0.x", "linux-musl", "linux-musl-openssl-3.0.x"]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ datasource client {
|
|||
|
||||
generator client {
|
||||
provider = "prisma-client-py"
|
||||
recursive_type_depth = -1
|
||||
binaryTargets = ["native", "debian-openssl-1.1.x", "debian-openssl-3.0.x", "linux-musl", "linux-musl-openssl-3.0.x"]
|
||||
}
|
||||
|
||||
|
|
|
|||
25
tests/test_litellm/proxy/test_prisma_schema.py
Normal file
25
tests/test_litellm/proxy/test_prisma_schema.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import re
|
||||
from pathlib import Path
|
||||
from typing import Final
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
REPOSITORY_ROOT: Final = Path(__file__).resolve().parents[3]
|
||||
SCHEMA_PATHS: Final = (
|
||||
REPOSITORY_ROOT / "schema.prisma",
|
||||
REPOSITORY_ROOT / "litellm/proxy/schema.prisma",
|
||||
REPOSITORY_ROOT / "litellm-proxy-extras/litellm_proxy_extras/schema.prisma",
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("schema_path", SCHEMA_PATHS)
|
||||
def test_prisma_client_uses_recursive_types(schema_path: Path) -> None:
|
||||
schema: Final = schema_path.read_text(encoding="utf-8")
|
||||
generator_settings: Final = schema.partition("generator client {")[2].partition("}")[0]
|
||||
|
||||
assert re.search(
|
||||
r"^\s*recursive_type_depth\s*=\s*-1\s*$",
|
||||
generator_settings,
|
||||
flags=re.MULTILINE,
|
||||
)
|
||||
Loading…
Add table
Reference in a new issue