示例#1
0
def test_get_app_pod(monkeypatch, common_endpoints, pod_endpoints):
    monkeypatch.setattr(jinad_config, 'CONTEXT', 'pod')
    routes = [(route.name, route.path) for route in get_app().routes]
    assert sorted(routes) == sorted(common_endpoints + pod_endpoints)
示例#2
0
def fastapi_client():
    from jinad.main import get_app
    app = get_app()
    client = TestClient(app)
    return client