From 2862d08d663128d4a135a0ce7821e00aeeaee32b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 23 Mar 2007 11:18:10 +0000
Subject: [PATCH] setDescription(None) removes the property. Anyway, we should
 not rely on this behaviour when testing interaction workflows.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13590 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/tests/testInteractionWorkflow.py | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/product/ERP5/tests/testInteractionWorkflow.py b/product/ERP5/tests/testInteractionWorkflow.py
index a1d9cd3d7c..1378b17761 100644
--- a/product/ERP5/tests/testInteractionWorkflow.py
+++ b/product/ERP5/tests/testInteractionWorkflow.py
@@ -221,14 +221,10 @@ class TestInteractionWorkflow(ERP5TypeTestCase):
     params = 'sci,**kw'
     body = "context = sci.object\n" +\
            "description = context.getDescription()\n" +\
-           "if description is None:\n" +\
-           "  description = ''\n" +\
            "context.setDescription(description + 'a')"
     self.script.ZPythonScript_edit(params,body)
     self.createData()
     organisation = self.organisation
-    organisation.setDescription(None)
-    self.assertEquals(organisation.getDescription(),None)
     organisation.edit()
     self.assertEquals(organisation.getDescription(),'a')
     organisation.edit()
@@ -268,14 +264,10 @@ class TestInteractionWorkflow(ERP5TypeTestCase):
     params = 'sci,**kw'
     body = "context = sci.object\n" +\
            "description = context.getDescription()\n" +\
-           "if description is None:\n" +\
-           "  description = ''\n" +\
            "context.setDescription(description + 'a')"
     self.script.ZPythonScript_edit(params,body)
     self.createData()
     organisation = self.organisation
-    organisation.setDescription(None)
-    self.assertEquals(organisation.getDescription(), None)
     organisation.setCorporateName('corp')
     self.assertEquals(organisation.getDescription(),'a')
     organisation.setActivityCode('acode')
@@ -299,16 +291,12 @@ class TestInteractionWorkflow(ERP5TypeTestCase):
     body = "context = sci.object\n" +\
            "context.log('InteractionWF.test_09 in script', 'a')\n" +\
            "description = context.getDescription()\n" +\
-           "if description is None:\n" +\
-           "  description = ''\n" +\
            "context.setDescription(description + 'a')"
     self.scriptA.ZPythonScript_edit(params, body)
     self.scriptB.ZPythonScript_edit(params, body.replace("'a'", "'b'"))
     
     self.createData()
     organisation = self.organisation
-    organisation.setDescription(None)
-    self.assertEquals(organisation.getDescription(), None)
     organisation.edit()
     self.assert_(organisation.getDescription() in ('ab', 'ba'),
         "description should be 'ab' or 'ba', it is %s" %
@@ -332,16 +320,12 @@ class TestInteractionWorkflow(ERP5TypeTestCase):
     body = "context = sci.object\n" +\
            "context.log('InteractionWF.test_10 in script', 'a')\n" +\
            "description = context.getDescription()\n" +\
-           "if description is None:\n" +\
-           "  description = ''\n" +\
            "context.setDescription(description + 'a')"
     self.scriptA.ZPythonScript_edit(params, body)
     self.scriptB.ZPythonScript_edit(params, body.replace("'a'", "'b'"))
     
     self.createData()
     organisation = self.organisation
-    organisation.setDescription(None)
-    self.assertEquals(organisation.getDescription(), None)
     organisation.edit()
     self.assert_(organisation.getDescription() in ('ab', 'ba'),
         "description should be 'ab' or 'ba', it is %s" %
@@ -370,8 +354,6 @@ class TestInteractionWorkflow(ERP5TypeTestCase):
     body = "context = sci.object\n" +\
            "context.log('InteractionWF.test_10 in script', 'a')\n" +\
            "description = context.getDescription()\n" +\
-           "if description is None:\n" +\
-           "  description = ''\n" +\
            "context.setDescription(description + 'a')"
     self.scriptA.ZPythonScript_edit(params, body)
     self.scriptB.ZPythonScript_edit(params, body.replace("'a'", "'b'"))
-- 
2.30.9