from fxhnt.application.sim_curves import SIM_BOOKS, sim_returns_for


def _bybit(): return {"tstrend": {0: 0.0, 1: 0.01}}
def _ibkr(book): return {book: {0: 0.0, 1: 0.02}}


def test_bybit_book_reads_bybit_sleeve_returns():
    out = sim_returns_for("bybit_4edge", bybit_returns=_bybit, ibkr_curve=_ibkr)
    assert out == {"tstrend": {0: 0.0, 1: 0.01}}


def test_ibkr_recompute_replay_book_reads_ibkr_curve():
    out = sim_returns_for("multistrat", bybit_returns=_bybit, ibkr_curve=_ibkr)
    assert out == {"multistrat": {0: 0.0, 1: 0.02}}


def test_sim_books_includes_ibkr():
    assert "multistrat" in SIM_BOOKS and "bybit_4edge" in SIM_BOOKS
    assert SIM_BOOKS == ("bybit_4edge", "bybit_4edge_levered", "multistrat", "multistrat_levered")
