Skip to Content
Menu
This question has been flagged
1 Reply
1686 Views
class Number(models.Model):
  _name = "bn"
  _description = 'Number'
  _inherit = ['mail.thread']
  _rec_name = 'business_no'
  bno = fields.Char(string='Bnumber', required=True)
  mno_id = fields.Many2one('bn.mno', string='MNO', required=True)
  account_id = fields.Many2one('account.account', string='Account', required=True)
  service_id = fields.Many2one('account.account', string='Service', required=True)
  _sql_constraints = [
  ('bno''unique(bno)''Bnumber already exists!')
  ]

In this model their are 4 mendotry fields.I want to write all possible test cases for this senerion.
Please tell me best approach for handling possible cases:
1) All fields provided with correct value.
2) All fields provided with incorrect value.
3) All fields not provided.

Please tell me good approach for writing test case?
Avatar
Discard
Related Posts Replies Views Activity
2
Jul 22
7405
1
Jun 21
1058
2
Feb 21
299
5
Sep 20
12742
4
Jun 20
48215