From fb93456c6ca6cd89ed4407ebc0a3160f1fe5e2ca Mon Sep 17 00:00:00 2001 From: Nicolas Dumazet <nicolas.dumazet@nexedi.com> Date: Wed, 17 Mar 2010 04:35:30 +0000 Subject: [PATCH] Do not fail if getOrderValue is None git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33771 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Legacy/tests/testLegacyProductionOrder.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/product/ERP5Legacy/tests/testLegacyProductionOrder.py b/product/ERP5Legacy/tests/testLegacyProductionOrder.py index 793a65d4ce..d37d8b1674 100644 --- a/product/ERP5Legacy/tests/testLegacyProductionOrder.py +++ b/product/ERP5Legacy/tests/testLegacyProductionOrder.py @@ -715,7 +715,10 @@ class TestProductionOrderMixin(TestOrderMixin): LOG('Raise Assertion error',0,'') LOG('object.getQuantity()',0,object.getQuantity()) LOG('object.__dict__',0,object.__dict__) - LOG('object.getOrderValue().getQuantity()',0,object.getOrderValue().getQuantity()) + order_value = object.getOrderValue() + LOG('object.getOrderValue()',0, order_value) + if order_value is not None: + LOG('object.getOrderValue().getQuantity()',0,order_value.getQuantity()) raise AssertionError, "Attribute: %s, Value: %s, Result: %s" %\ (attribute, value, getattr(object, attribute)()) -- 2.30.9