mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 17:05:41 +01:00
Some checks failed
release-please / release-please (push) Has been cancelled
tests / setup (push) Has been cancelled
tests / ${{ matrix.quality-command }} (black) (push) Has been cancelled
tests / ${{ matrix.quality-command }} (mypy) (push) Has been cancelled
tests / ${{ matrix.quality-command }} (ruff) (push) Has been cancelled
tests / test (push) Has been cancelled
tests / all_checks_passed (push) Has been cancelled
* chore: update libraries * fix: mypy * chore: more updates * fix: mypy/black * chore: fix docker warnings * fix: mypy * fix: black
14 lines
465 B
Python
14 lines
465 B
Python
import pytest
|
|
from fastapi.testclient import TestClient
|
|
|
|
from private_gpt.launcher import create_app
|
|
from tests.fixtures.mock_injector import MockInjector
|
|
|
|
|
|
@pytest.fixture
|
|
def test_client(request: pytest.FixtureRequest, injector: MockInjector) -> TestClient:
|
|
if request is not None and hasattr(request, "param"):
|
|
injector.bind_settings(request.param or {})
|
|
|
|
app_under_test = create_app(injector.test_injector)
|
|
return TestClient(app_under_test)
|