'Ensure positions will be liquidated completely when asked.
Include a long & a short.'

def test_will_liquidate_positions(self):

    self.portfolio._add_position('BOT', 'AAA', 100, PriceParser.parse(60.0), 0.0)
    self.portfolio._add_position('BOT', 'BBB', (-100), PriceParser.parse(60.0), 0.0)
    exit_a = SuggestedOrder('AAA', 'EXIT', 0)
    exit_b = SuggestedOrder('BBB', 'EXIT', 0)
    sized_a = self.position_sizer.size_order(self.portfolio, exit_a)
    sized_b = self.position_sizer.size_order(self.portfolio, exit_b)
    self.assertEqual(sized_a.action, 'SLD')
    self.assertEqual(sized_b.action, 'BOT')
    self.assertEqual(sized_a.quantity, 100)
    self.assertEqual(sized_a.quantity, 100)
