跳至內容
選單
此問題已被標幟
2619 瀏覽次數
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?
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
7月 22
9113
1
6月 21
2388
2
2月 21
299
5
9月 20
14283
4
6月 20
49678