Commit d13df1dc authored by Ivan Tyagov's avatar Ivan Tyagov

More verbose testing.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12667 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f03865a2
...@@ -83,6 +83,16 @@ class TestPerson(ERP5TypeTestCase): ...@@ -83,6 +83,16 @@ class TestPerson(ERP5TypeTestCase):
## because we copy/paste Person object in the same ERP5 ## because we copy/paste Person object in the same ERP5
## instance its reference must be resetted ## instance its reference must be resetted
self.assertEquals(person_copy_obj.getReference(), None) self.assertEquals(person_copy_obj.getReference(), None)
## set object as if installed from bt5 (simulate it)
request = self.app.REQUEST
request.set('is_business_template_installation', 1)
person_copy = person_module.manage_copyObjects(ids=(person.getId(),))
person_copy_id = person_module.manage_pasteObjects(person_copy)[0]['new_id']
person_copy_obj = person_module[person_copy_id]
## because we copy/paste Person object in the same ERP5
## instance its reference must be resetted
self.assertEquals(person_copy_obj.getReference(), person.getReference())
if __name__ == '__main__': if __name__ == '__main__':
framework() framework()
...@@ -92,4 +102,3 @@ else: ...@@ -92,4 +102,3 @@ else:
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestPerson)) suite.addTest(unittest.makeSuite(TestPerson))
return suite return suite
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