refactor tests, improve failures

This commit is contained in:
Leonardo Pistone
2015-03-30 12:31:46 +02:00
parent 3411e32f57
commit 67d88d0701

View File

@@ -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
-