Commit 00483499 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Test int and float IDs with temp objects.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4321 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 44e07c77
......@@ -111,6 +111,21 @@ class TestERP5Type(ERP5TypeTestCase):
# Person class should now have method getFirstName
self.failUnless(hasattr(person, 'getFirstName'))
def test_03_NewTempObject(self):
portal = self.getPortal()
from Products.ERP5Type.Document import newTempPerson
o = newTempPerson(portal, 1.2)
o.setTitle('toto')
self.assertEquals(o.getTitle(), 'toto')
self.assertEquals(str(o.getId()), str(1.2))
from Products.ERP5Type.Document import newTempOrganisation
o = newTempOrganisation(portal, -123)
o.setTitle('toto')
self.assertEquals(o.getTitle(), 'toto')
self.assertEquals(str(o.getId()), str(-123))
if __name__ == '__main__':
framework()
......
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