From 7bd4e4af7a88f3b83854ea7a17ca43d900f31ca2 Mon Sep 17 00:00:00 2001
From: Leonardo Rochael Almeida <leonardo@nexedi.com>
Date: Tue, 18 Oct 2011 15:44:48 +0200
Subject: [PATCH] Fix broken test

---
 product/ERP5/tests/testRule.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/tests/testRule.py b/product/ERP5/tests/testRule.py
index 0c724856b1..b7625382e4 100644
--- a/product/ERP5/tests/testRule.py
+++ b/product/ERP5/tests/testRule.py
@@ -368,11 +368,12 @@ return context.generatePredicate(
     transaction.commit()
     self.tic()
     # Now since the rule has a trade_phase
-    self.assertEqual(delivery_rule.getTradePhaseList(), ['default/delivery'])
+    trade_phase_list = delivery_rule.getTradePhaseList()
+    self.assertEqual(trade_phase_list, ['default/delivery'])
     # then it should be possible to find it by passing this trade_phase
     # as an additional catalog keyword
     kw = {'trade_phase_relative_url':
-            ['trade_phase/' + path for path in delivery.getTradePhaseList()]}
+            ['trade_phase/' + path for path in trade_phase_list]}
     # XXX-Leo: Fugly catalog syntax for category search above.
     self.assertEqual(len(rule_tool.searchRuleList(self.sm, **kw)), 1)
     # and also not to match it if we pass a different trade_phase
-- 
2.30.9