def test_order_total_multi_item(self): order = Order(self.member, self.room) item = OrderItem(self.product, order, 2) order.items.add(item) self.assertEqual(order.total(), 20)
def test_order_total_single_item(self): order = Order(self.member, self.room) item = OrderItem(self.product, order, 1) order.items.add(item) self.assertEqual(order.total(), 10)