Skip to content

Commit 80d16ae

Browse files
committed
added test case for code coverage
1 parent 994c90a commit 80d16ae

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

spp_programs_sp/tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
from . import test_entitlement_manager_cash
33
from . import test_entitlement_manager_default
44
from . import test_entitlement_manager_inkind
5+
from . import test_create_program_wizard
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from odoo.tests.common import TransactionCase
2+
3+
4+
class CreateProgramWizardTest(TransactionCase):
5+
@classmethod
6+
def setUpClass(cls):
7+
super().setUpClass()
8+
cls._program_create_wiz = cls.env["g2p.program.create.wizard"].create(
9+
{
10+
"name": "Program 1 [TEST]",
11+
"rrule_type": "monthly",
12+
"eligibility_domain": "[]",
13+
"cycle_duration": 1,
14+
"currency_id": cls.env.company.currency_id.id,
15+
"amount_per_cycle": 1.0,
16+
"store_sp_in_entitlements": True,
17+
}
18+
)
19+
20+
def test_get_program_vals(self):
21+
vals = self._program_create_wiz.get_program_vals()
22+
23+
self.assertIn("store_sp_in_entitlements", vals)
24+
self.assertTrue(vals["store_sp_in_entitlements"])

0 commit comments

Comments
 (0)