chore(ml): update pydantic ()

* update pydantic

* fix typing

* remove unused import

* remove unused schema
This commit is contained in:
Mert 2024-10-13 18:00:21 -04:00 committed by GitHub
parent f29fb1655a
commit e7397f35c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 186 additions and 82 deletions
machine-learning/app

View file

@ -810,11 +810,26 @@ class TestLoad:
mock_model.model_format = ModelFormat.ONNX
def test_root_endpoint(deployed_app: TestClient) -> None:
response = deployed_app.get("http://localhost:3003")
body = response.json()
assert response.status_code == 200
assert body == {"message": "Immich ML"}
def test_ping_endpoint(deployed_app: TestClient) -> None:
response = deployed_app.get("http://localhost:3003/ping")
assert response.status_code == 200
assert response.text == "pong"
@pytest.mark.skipif(
not settings.test_full,
reason="More time-consuming since it deploys the app and loads models.",
)
class TestEndpoints:
class TestPredictionEndpoints:
def test_clip_image_endpoint(
self, pil_image: Image.Image, responses: dict[str, Any], deployed_app: TestClient
) -> None: