Пример #1
0
 def test_total_profit_without_corrections(self):
     order_round = OrderRoundFactory()
     orderprod1 = OrderProductFactory(order__order_round=order_round,
                                      order__paid=True)
     self.assertEqual(order_round.total_profit(),
                      orderprod1.product.profit * orderprod1.amount)
Пример #2
0
 def test_total_profit_without_corrections(self):
     round = OrderRoundFactory()
     orderprod1 = OrderProductFactory(order__order_round=round, order__paid=True)
     self.assertEqual(round.total_profit(), orderprod1.product.profit * orderprod1.amount)