Skip to Content
Menu
This question has been flagged
1992 Views
res = ''
vals = {
    
"name""test",
    
"partner_id"1000,
}
koko_base_config = 
self.env['koko.bn.mno']
res = koko_base_config.create(vals)
self.assertRaises(IntegrityError, res.write, vals)
This gives me:
psycopg2.IntegrityError: insert or update on table "koko_bn_mno" violates foreign key constraint "koko_bn_mno_partner_id_fkey"

How to handle it for running wrong testcase successfully?
Avatar
Discard
Related Posts Replies Views Activity
2
Jul 22
7403
1
Jun 21
1058
2
Feb 21
299
5
Sep 20
12741
4
Jun 20
48215