From 67d88d07015a31857cab18b3aac2dd34f1777d6d Mon Sep 17 00:00:00 2001 From: Leonardo Pistone Date: Mon, 30 Mar 2015 12:31:46 +0200 Subject: [PATCH] refactor tests, improve failures --- stock_reserve/test/stock_reserve.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stock_reserve/test/stock_reserve.yml b/stock_reserve/test/stock_reserve.yml index 0a4e58adb..369b1563f 100644 --- a/stock_reserve/test/stock_reserve.yml +++ b/stock_reserve/test/stock_reserve.yml @@ -60,8 +60,8 @@ - I confirm the reservation - - !python {model: stock.reservation}: | - self.reserve(cr, uid, [ref('reserv_sorbet2')], context=context) + !python {model: stock.reservation, id: reserv_sorbet2}: | + self.reserve() - I check the reserved amount of the product and the template - @@ -80,9 +80,9 @@ - I check Virtual stock of Sorbet after update reservation - - !python {model: product.product}: | - product = self.browse(cr, uid, ref('stock_reserve.product_sorbet'), context=context) - assert product.virtual_available == 3.5, "Stock is not updated." + !python {model: product.product, id: product_sorbet}: | + from nose.tools import * + assert_almost_equal(3.5, self.virtual_available) - I run the scheduler -