def test_is_negative_at_cost(self): pos1 = Position(Lot("USD", A('10 AUD'), None), D('1')) pos2 = Position(Lot("USD", A('10 AUD'), None), D('-1')) self.assertFalse(pos1.is_negative_at_cost()) self.assertTrue(pos2.is_negative_at_cost())
def test_is_negative_at_cost(self): pos1 = Position(A("1 USD"), Cost('10', 'AUD', None, None)) pos2 = Position(A("-1 USD"), Cost('10', 'AUD', None, None)) self.assertFalse(pos1.is_negative_at_cost()) self.assertTrue(pos2.is_negative_at_cost())