December 2018
Beginner to intermediate
404 pages
10h 14m
English
Python tests are added to addon modules in a tests/ subdirectory. The test runner will automatically discover tests in the subdirectories with this particular name.
To add tests for the wizard logic created in the library_checkout add-on module, we can start by creating the tests/test_checkout_mass_message.py file. As usual, we will also need to add the tests/__init__.py file, as follows:
from . import test_checkout_mass_message
The following would be the basic skeleton for the tests/test_checkout_mass_message.py test code:
from odoo.tests.common import TransactionCase class TestWizard(TransactionCase): def setUp(self, *args, **kwargs): super(TestWizard, self).setUp(*args, **kwargs) # Add test setup code here... def test_button_send(self): ...
Read now
Unlock full access