Odoo Module Testing — a practical guide to Odoo module testing with clear examples you can reuse in real projects.
Odoo Tutorial Series (108/112). Prefer one article? Read the complete Odoo tutorial.
Short description
Tests protect upgrades and refactors of business logic.
Test tip
from odoo.tests.common import TransactionCase
class TestBook(TransactionCase):
def test_create_book(self):
book = self.env['library.book'].create({'name': 'Test'})
self.assertTrue(book.id)