I want to write tests on v8 modules, but dont seem to find a way to use new api. In all examples I see that cr, uid is still used etc. Is it possible to write tests with new api. If so how (any references etc)?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilità
- Magazzino
- PoS
- Project
- MRP
La domanda è stata contrassegnata
Hello Andrius Laukavičius,
Yes, you can write tests using all new api stuff.
like,
from openerp.tests import common
class testPartnerCreate(common.TransactionCase):
def setUp(self):
super(testPartnerCreate, self).setUp()
def test_create(self):
res_partner = self.env['res.partner']
test_partner1 = res_partner.create(
dict(
name="Demo bhai",
city="test city",
email="demo@test.com",
))
......
Hope this will help.
Regards....
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
RegistratiPost correlati | Risposte | Visualizzazioni | Attività | |
---|---|---|---|---|
|
1
dic 19
|
3135 | ||
|
2
dic 24
|
2316 | ||
|
1
nov 22
|
3585 | ||
|
2
feb 22
|
5696 | ||
|
1
feb 22
|
4066 |