env 配置去掉期权/对冲模式与对冲计划区块,仅保留单独期权。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -67,6 +67,21 @@ class RemoveHedgeSmokeTests(unittest.TestCase):
|
||||
self.assertNotIn("hedge_target_map", src)
|
||||
self.assertNotIn("hedge_plan_target", src)
|
||||
|
||||
def test_env_ui_no_hedge_mode_section(self):
|
||||
from lib.env.env_ui_manifest import ui_sections_for_exchange
|
||||
from lib.env.env_schema import select_options_for
|
||||
|
||||
titles = [s["title"] for s in ui_sections_for_exchange("okx")]
|
||||
self.assertNotIn("期权/对冲模式", titles)
|
||||
self.assertTrue(any("对冲" not in t for t in titles))
|
||||
for t in titles:
|
||||
self.assertNotIn("对冲", t)
|
||||
labels = [f[1] for s in ui_sections_for_exchange("okx") for f in s["fields"]]
|
||||
for lab in labels:
|
||||
self.assertNotIn("对冲", lab)
|
||||
mode_opts = [o["value"] for o in select_options_for("OKX_TRADE_MODE")]
|
||||
self.assertEqual(mode_opts, ["options"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user