[Erp5-report] r18249 - /erp5/trunk/products/ERP5/tests/testERP5Base.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Dec 11 17:33:08 CET 2007
Author: jerome
Date: Tue Dec 11 17:33:06 2007
New Revision: 18249
URL: http://svn.erp5.org?rev=18249&view=rev
Log:
* test that we can validate Bank Accounts inside Persons/Organisation, even if they have an Agent inside.
* tests that we can create Images in Persons/Organisation and that images are valid by default
Modified:
erp5/trunk/products/ERP5/tests/testERP5Base.py
Modified: erp5/trunk/products/ERP5/tests/testERP5Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testERP5Base.py?rev=18249&r1=18248&r2=18249&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testERP5Base.py (original)
+++ erp5/trunk/products/ERP5/tests/testERP5Base.py Tue Dec 11 17:33:06 2007
@@ -920,6 +920,26 @@
field.get_value('default'))
+ def test_CreateBankAccount(self):
+ # We can add Bank Accounts inside Persons and Organisation
+ for entity in (self.getPersonModule().newContent(portal_type='Person'),
+ self.getOrganisationModule().newContent(portal_type='Organisation')):
+ bank_account = entity.newContent(portal_type='Bank Account')
+ self.assertEquals([], bank_account.checkConsistency())
+ bank_account.newContent(portal_type='Agent')
+ self.assertEquals([], bank_account.checkConsistency())
+ self.portal.portal_workflow.doActionFor(bank_account, 'validate_action')
+ self.assertEquals('validated', bank_account.getValidationState())
+
+ def test_CreateImage(self):
+ # We can add Images inside Persons and Organisation
+ for entity in (self.getPersonModule().newContent(portal_type='Person'),
+ self.getOrganisationModule().newContent(portal_type='Organisation')):
+ image = entity.newContent(portal_type='Image')
+ self.assertEquals([], image.checkConsistency())
+ image.view() # viewing the image does not cause error
+
+
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestERP5Base))
More information about the Erp5-report
mailing list