From 795774d13cbc31361df5758c86484d2b86ec50e7 Mon Sep 17 00:00:00 2001
From: Nicolas Dumazet <nicolas.dumazet@nexedi.com>
Date: Wed, 10 Mar 2010 04:52:33 +0000
Subject: [PATCH] do not raise AttributeError is model_2_cell is None, fail
 instead.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33549 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/tests/testPayroll.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/product/ERP5/tests/testPayroll.py b/product/ERP5/tests/testPayroll.py
index ef2f305d8d..31a87f0982 100644
--- a/product/ERP5/tests/testPayroll.py
+++ b/product/ERP5/tests/testPayroll.py
@@ -3302,10 +3302,10 @@ class TestPayroll(TestPayrollMixin):
     cell.setQuantityRangeMax(2)
 
     # model 2 gets cell values from model 1 (see test_07_model_getCell)
-    self.assertEquals(1,
-        model_2.getCell('salary_range/france/slice_a').getQuantityRangeMin())
-    self.assertEquals(2,
-        model_2.getCell('salary_range/france/slice_a').getQuantityRangeMax())
+    model_2_cell = model_2.getCell('salary_range/france/slice_a')
+    self.failIf(model_2_cell is None)
+    self.assertEquals(1, model_2_cell.getQuantityRangeMin())
+    self.assertEquals(2, model_2_cell.getQuantityRangeMax())
 
     # model 2 can override values
     model_2.edit(variation_settings_category_list=('salary_range/france',))
-- 
2.30.9