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

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)
Fail if the two objects are unequal as determined by the '=='
operator.

src/o/p/openerp-core-7.0.406/openerp/tests/test_basecase.py   openerp-core(Download)
        self.registry('res.partner').create(cr, uid, {'name': 'test_per_class_teardown_partner'})
        ids = self.registry('res.partner').search(cr, uid, [('name', '=', 'test_per_class_teardown_partner')])
        self.assertEqual(1, len(ids), "Test partner not found.")
 
    def test_01(self):
        """Find the created partner."""
        cr, uid = self.cr, self.uid
        ids = self.registry('res.partner').search(cr, uid, [('name', '=', 'test_per_class_teardown_partner')])
        self.assertEqual(1, len(ids), "Test partner not found.")
        partner = res_partner.browse(cr, uid, p_ref)
        p_browse_ref = self.browse_ref(xid)
        self.assertEqual(partner, p_browse_ref, "browse_ref() should resolve xid to browse records")