From d13df1dcbe5c0b929411c56cbfe5c7197e9665da Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Tue, 13 Feb 2007 15:18:38 +0000
Subject: [PATCH] More verbose testing.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12667 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/tests/testPerson.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/product/ERP5/tests/testPerson.py b/product/ERP5/tests/testPerson.py
index 27c99e2eb1..821926a3e7 100644
--- a/product/ERP5/tests/testPerson.py
+++ b/product/ERP5/tests/testPerson.py
@@ -83,6 +83,16 @@ class TestPerson(ERP5TypeTestCase):
       ## because we copy/paste Person object in the same ERP5 
       ## instance its reference must be resetted
       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__':
     framework()
@@ -92,4 +102,3 @@ else:
         suite = unittest.TestSuite()
         suite.addTest(unittest.makeSuite(TestPerson))
         return suite
-
-- 
2.30.9