1- from investing_algorithm_framework import PortfolioConfiguration , OrderStatus , \
2- MarketCredential
1+ from investing_algorithm_framework import PortfolioConfiguration , \
2+ OrderStatus , MarketCredential
33from tests .resources import TestBase
44
55
@@ -32,7 +32,8 @@ def test_create_limit_sell_order(self):
3232 )
3333 order_repository = self .app .container .order_repository ()
3434 self .assertEqual (
35- 1 , order_repository .count ({"order_type" : "LIMIT" , "order_side" : "BUY" })
35+ 1 , order_repository
36+ .count ({"order_type" : "LIMIT" , "order_side" : "BUY" })
3637 )
3738 order = order_repository .find ({"target_symbol" : "BTC" })
3839 self .assertEqual (OrderStatus .OPEN .value , order .status )
@@ -43,7 +44,7 @@ def test_create_limit_sell_order(self):
4344 self .assertEqual (800 , portfolio .get_unallocated ())
4445 order_service = self .app .container .order_service ()
4546 order_service .check_pending_orders ()
46- position = self .app .algorithm .get_position ("BTC" )
47+ self .app .algorithm .get_position ("BTC" )
4748 order = self .app .algorithm .create_limit_order (
4849 target_symbol = "BTC" ,
4950 price = 10 ,
@@ -63,7 +64,8 @@ def test_create_limit_sell_order_with_percentage_position(self):
6364 )
6465 order_repository = self .app .container .order_repository ()
6566 self .assertEqual (
66- 1 , order_repository .count ({"order_type" : "LIMIT" , "order_side" : "BUY" })
67+ 1 , order_repository
68+ .count ({"order_type" : "LIMIT" , "order_side" : "BUY" })
6769 )
6870 order = order_repository .find ({"target_symbol" : "BTC" })
6971 self .assertEqual (OrderStatus .OPEN .value , order .status )
0 commit comments