Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(6)  |  Derive(0)  |  Import(3)

src/e/r/erp5-HEAD/product/ERP5Type/tests/testERP5Type.py   erp5(Download)
      self.assertEqual(str(o.getId()), str(1.2))
 
      from Products.ERP5Type.Document import newTempOrganisation
      o = newTempOrganisation(portal, -123)
      o.setTitle('toto')
      self.assertEqual(o.getTitle(), 'toto')
      self.assertEqual(str(o.getId()), str(-123))
 
      # Try to edit with any property and then get it with getProperty
      o = newTempOrganisation(portal,'a')
 
      # Same thing with an integer
      o = newTempOrganisation(portal,'b')
      o.edit(tata=123)
      self.assertEqual(o.getProperty('tata'), 123)
      self.logout()
      self.loginWithNoRole()
      o = newTempOrganisation(portal.organisation_module,'b')
      self.assertEqual(o.isTempObject(), 1)
      a = o.newContent(portal_type = 'Telephone')

src/e/r/erp5-HEAD/product/ERP5/tests/testBase.py   erp5(Download)
    """
    portal = self.getPortal()
    from Products.ERP5Type.Document import newTempOrganisation
    tmp_object = newTempOrganisation(portal, "a_wonderful_id")
    sequence.edit(
    """
    portal = self.getPortal()
    from Products.ERP5Type.Document import newTempOrganisation
    tmp_object = newTempOrganisation(portal, "a_wonderful_id")
    tmp_object.edit(title='new title')