Commit 21ec6f92 authored by Jérome Perrin's avatar Jérome Perrin

* test that we can validate Bank Accounts inside Persons/Organisation, even if...

* 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


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18249 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 24862e3d
......@@ -920,6 +920,26 @@ class TestERP5Base(ERP5TypeTestCase):
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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment