Team Ai
Apppublic

Sumitx369/Paper_Trading_Backtesting

sourceHugging Faceupdated 4mo agoView on Hugging Face
2likes
test_smoke.py25 linesDownload Raw Back to tests
1import trading_engine2 3 4def test_engine_ping():5    assert "C++" in trading_engine.ping()6 7 8def test_health(client):9    r = client.get("/health")10    assert r.status_code == 20011    assert r.json()["status"] == "ok"12 13 14def test_engine_endpoint(client):15    r = client.get("/engine/ping")16    assert r.status_code == 20017    assert "C++" in r.json()["engine"]18 19 20def test_dsl_template_and_catalog(client):21    assert "def strategy" in client.get("/dsl/template").json()["template"]22    cat = client.get("/dsl/catalog").json()23    funcs = [i["func"] for i in cat["indicators"]]24    assert "rsi" in funcs and "macd_line" in funcs25