]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Trader.git/blobdiff - test.py
Add first steps for margin trading
[perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Trader.git] / test.py
diff --git a/test.py b/test.py
index b7476175166721d25ab18c8e02dbfd404b4357d5..8a6ba50ea6d54c93786732d7510dc55ca9ada599 100644 (file)
--- a/test.py
+++ b/test.py
@@ -676,7 +676,7 @@ class AcceptanceTest(unittest.TestCase):
         self.assertEqual(D("0.00003003"), all_orders[1].rate)
 
 
-        def create_order(symbol, type, action, amount, price=None):
+        def create_order(symbol, type, action, amount, price=None, account="exchange"):
             self.assertEqual("limit", type)
             if symbol == "ETH/BTC":
                 self.assertEqual("sell", action)
@@ -771,7 +771,6 @@ class AcceptanceTest(unittest.TestCase):
         # Action 6
         portfolio.Trade.prepare_orders(only="buy", compute_value=lambda x, y: x["ask"])
 
-
         all_orders = portfolio.Trade.all_orders(state="pending")
         self.assertEqual(3, len(all_orders))
         self.assertEqual(portfolio.Amount("ETC", D("38.5")/3), all_orders[0].amount)