Close all positions on demo account when exiting tests
This commit is contained in:
parent
b8b39ea8d3
commit
a6f9e74ee1
|
@ -32,6 +32,11 @@ class ElasticMock:
|
|||
|
||||
|
||||
class LiveBase:
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
cls.account.client.close_all_positions()
|
||||
super(LiveBase, cls).tearDownClass()
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(LiveBase, cls).setUpClass()
|
||||
|
|
|
@ -78,3 +78,8 @@ class LiveTradingTestCase(ElasticMock, LiveBase, TestCase):
|
|||
|
||||
if not found:
|
||||
self.fail("Could not find the trade in the list of open trades")
|
||||
|
||||
def test_convert_open_trades(self):
|
||||
"""
|
||||
Test converting open trades response to Trade-like format.
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue