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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
1686
Views
Hi,
Have a look at this link: https://odoo-development.readthedocs.io/en/latest/qa/python/unittest.html
Thanks
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Jul 22
|
7405 | ||
|
1
Jun 21
|
1058 | ||
[SOLVED] Get related field
Solved
|
|
2
Feb 21
|
299 | |
|
5
Sep 20
|
12742 | ||
|
4
Jun 20
|
48215 |