OCA/sale-workflow — pull request #40 by gurneyalex (2014-09-10 08:56:54+00:00)
Title: Fix the tests on OCB branch (closes #37)

The test failures of sale_exception_nostock on OCB branch are caused by
https://github.com/OCA/OCB/commit/5d795c48fb394505d5a6bbf77961d63da05515c4
which changed the date considered for the stock moves from `date_order` to
`date_confirmed`.

In order to restore the test behavior, we mock `datetime.now`
which is ultimately used in `sale_order.action_wait` to write `date_confirm`.
The current date is restored after each confirmation, in order to avoid
impacting other aspects of the tests (if any).

This does not impact the test on the official branch and gives the correct
results on OCB.