From 003fc5ba2d3a121cf630a8323f04fe352077e3c4 Mon Sep 17 00:00:00 2001 From: vijay sharma Date: Fri, 30 Jan 2026 17:28:00 +0100 Subject: [PATCH] test: Enable live trading for ICICI Breeze mock order tests by setting environment variable and config. --- tests/exchange/test_icicibreeze_orders_mock.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/exchange/test_icicibreeze_orders_mock.py b/tests/exchange/test_icicibreeze_orders_mock.py index c7fd86cd3..3e9671eee 100644 --- a/tests/exchange/test_icicibreeze_orders_mock.py +++ b/tests/exchange/test_icicibreeze_orders_mock.py @@ -8,12 +8,23 @@ from freqtrade.exceptions import OperationalException @pytest.fixture(autouse=True) def force_market_open(): - """Ensure market is open for all mock order tests.""" - with mock.patch.dict(os.environ, {"FT_FORCE_MARKET_OPEN": "1", "RISK_GUARD_ENABLED": "false"}): + """Ensure market is open and live guard passes for all mock order tests.""" + with mock.patch.dict( + os.environ, + { + "FT_FORCE_MARKET_OPEN": "1", + "RISK_GUARD_ENABLED": "false", + "FT_ENABLE_LIVE_ORDERS": "1", + }, + ): yield -MOCK_CONFIG = {"options": {"mode": "mock"}, "risk_guard": {"enabled": False}} +MOCK_CONFIG = { + "options": {"mode": "mock"}, + "risk_guard": {"enabled": False}, + "icicibreeze": {"live_trading": {"enabled": True}}, +} def test_sync_mock_execution():