fix: align research metadata with live WorldQuant responses
This commit is contained in:
@@ -255,3 +255,21 @@ async def test_restart_reuses_preview_and_known_backtest(app, logged_in, flow_se
|
||||
after = await get(logged_in, run["id"])
|
||||
assert after["simulations_used"] == 2 and len(platform.posts) == 1
|
||||
assert next(s for s in after["steps"] if s["node_id"] == "simulate")["backtest_run_id"] == backtest_id
|
||||
|
||||
|
||||
async def test_legacy_authorization_keeps_default_execution_settings(app, logged_in, flow_setup):
|
||||
from app.models import ResearchFlowRun
|
||||
|
||||
body, _, lane, _ = flow_setup
|
||||
run = await begin(logged_in, body)
|
||||
async with app.state.sessions.begin() as db:
|
||||
saved = await db.get(ResearchFlowRun, run["id"])
|
||||
authorization = dict(saved.authorization)
|
||||
authorization["settings"] = {k: v for k, v in authorization["settings"].items() if k != "maxPosition"}
|
||||
authorization["allowed_settings"] = [
|
||||
{k: v for k, v in item.items() if k != "maxPosition"}
|
||||
for item in authorization["allowed_settings"]
|
||||
]
|
||||
saved.authorization = authorization
|
||||
final = await drive(app, logged_in, run["id"], lane)
|
||||
assert final["status"] == "completed" and final["simulations_used"] == 4
|
||||
|
||||
Reference in New Issue
Block a user