File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,17 @@ def order_manager(initialized_client):
1212 Fixture for an OrderManager wired to a mocked ProjectX client.
1313 Also patches align_price_to_tick_size to return the input price for determinism.
1414 """
15- # Patch align_price_to_tick_size globally for all tests in this module
16- patcher = patch (
15+ # Patch align_price_to_tick_size in both utils and core to return input price for determinism
16+ patch_utils = patch (
1717 "project_x_py.order_manager.utils.align_price_to_tick_size" ,
1818 new = AsyncMock (side_effect = lambda price , * _args , ** _kwargs : price ),
1919 )
20- patcher .start ()
20+ patch_core = patch (
21+ "project_x_py.order_manager.core.align_price_to_tick_size" ,
22+ new = AsyncMock (side_effect = lambda price , * _args , ** _kwargs : price ),
23+ )
24+ patch_utils .start ()
25+ patch_core .start ()
2126
2227 # Set up a dummy account
2328 initialized_client .account_info = Account (
@@ -32,7 +37,8 @@ def order_manager(initialized_client):
3237 om = OrderManager (initialized_client )
3338 yield om
3439
35- patcher .stop ()
40+ patch_utils .stop ()
41+ patch_core .stop ()
3642
3743
3844@pytest .fixture
You can’t perform that action at this time.
0 commit comments