Build Pigway Frame Flow with bilingual UI, complete KoKonna driver and safe automation
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from pigway_frame_flow.api.app import create_app
|
||||
from pigway_frame_flow.settings import Settings
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def settings(tmp_path):
|
||||
return Settings(
|
||||
data_dir=tmp_path / "data",
|
||||
config_dir=tmp_path / "config",
|
||||
api_token="test-frame-token",
|
||||
mock=True,
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def app(settings):
|
||||
return create_app(settings, start_worker=False)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def client(app):
|
||||
with TestClient(app) as c:
|
||||
c.headers["Authorization"] = "Bearer test-frame-token"
|
||||
yield c
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def service(app):
|
||||
return app.state.service
|
||||
Reference in New Issue
Block a user