From 4472569c2c07f9770b06145855dc033d41356529 Mon Sep 17 00:00:00 2001 From: Joan Mateu Jordi Date: Thu, 17 Feb 2022 08:52:40 +0100 Subject: [PATCH] [IMP][15.0] mrp_progress_button: Improved tests with time --- mrp_progress_button/tests/test_progress_button.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mrp_progress_button/tests/test_progress_button.py b/mrp_progress_button/tests/test_progress_button.py index 8a4b3fb29..f2d2773d5 100644 --- a/mrp_progress_button/tests/test_progress_button.py +++ b/mrp_progress_button/tests/test_progress_button.py @@ -2,6 +2,8 @@ # @author Florian DA COSTA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from datetime import datetime + from odoo.tests.common import TransactionCase @@ -50,7 +52,7 @@ class TestProgressButton(TransactionCase): } ) - def test_manufacture_with_forecast_stock(self): + def test_01_manufacture_with_forecast_stock(self): """ Test Manufacture mto with stock based on forecast quantity and no link between sub assemblies MO's and Main MO raw material @@ -65,5 +67,9 @@ class TestProgressButton(TransactionCase): ) production.action_progress() self.assertEqual(production.state, "progress") + self.assertEqual( + production.date_start.replace(microsecond=0), + datetime.now().replace(microsecond=0), + ) production.action_unstart() self.assertEqual(production.state, "confirmed")