[Erp5-report] r19615 - /erp5/trunk/products/ERP5/tests/testInteractionWorkflow.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Feb 29 17:29:29 CET 2008


Author: alex
Date: Fri Feb 29 17:29:29 2008
New Revision: 19615

URL: http://svn.erp5.org?rev=19615&view=rev
Log:
in test_13, define edit_order when calling edit(), and test both possibilities

Modified:
    erp5/trunk/products/ERP5/tests/testInteractionWorkflow.py

Modified: erp5/trunk/products/ERP5/tests/testInteractionWorkflow.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testInteractionWorkflow.py?rev=19615&r1=19614&r2=19615&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testInteractionWorkflow.py (original)
+++ erp5/trunk/products/ERP5/tests/testInteractionWorkflow.py Fri Feb 29 17:29:29 2008
@@ -422,9 +422,10 @@
     self.assertEquals(organisation.getTitle(), 'foo')
     self.assertEquals(organisation.getVatCode(), 'bar')
 
-    organisation.edit(title='baz', vat_code='bar')
+    organisation.edit(title='baz', vat_code='bar', edit_order=['vat_code',
+      'title'])
     self.assertEquals(organisation.getTitle(),'baz')
-    # here, the wrong behaviour was:
+    # here, the wrong behaviour is:
     # - edit:setTitle(baz)
     # - interaction:setVatCode(bara)
     # - edit:setVatCode(bar)
@@ -433,6 +434,16 @@
     # - edit:setVatCode(bar)
     # - interaction:setVatCode(bara)
     self.assertEquals(organisation.getVatCode(),'bara')
+    # now, test the other way around
+    organisation.edit(title='baz', vat_code='bara', edit_order=['title',
+      'vat_code'])
+    self.assertEquals(organisation.getTitle(),'baz')
+    # here, we assert the failure:
+    # - edit:setTitle(baz)
+    # - interaction:setVatCode(baraa)
+    # - edit:setVatCode(bara)
+    self.assertEquals(organisation.getVatCode(),'bara')
+
     
   def test_14_BeforeScriptParameters(self, quiet=0, run=run_all_test):
     if not run: return




More information about the Erp5-report mailing list