from src.tools.hl_testnet_fill_stop_smoke import _is_stop_order


def test_is_stop_order_treats_reduce_only_exchange_order_as_protection():
    order = {"coin": "BTC", "reduceOnly": True, "side": "A", "sz": "0.00024"}

    assert _is_stop_order(order) is True


def test_is_stop_order_rejects_plain_non_reduce_limit_order():
    order = {"coin": "BTC", "side": "B", "sz": "0.00024"}

    assert _is_stop_order(order) is False
