Skip to content

Commit

Permalink
Merge pull request #434 from OpenSPP/fix_test_eligibility_sql
Browse files Browse the repository at this point in the history
Fix test of spp_eligibility_sql
  • Loading branch information
jeremi authored Jun 5, 2024
2 parents 273c5a8 + 8a5e35c commit 3b587c6
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions spp_eligibility_sql/tests/test_create_program_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,18 @@ def setUpClass(cls):
{
"name": "Test Program 1 [SQL Elibigility]",
"eligibility_kind": "sql_eligibility",
"sql_query": "select id from res_partner where z_ind_grp_num_eligible_children_under_12_months > 0",
"sql_query": "select id from res_partner where family_name = 'Butay'",
"rrule_type": "monthly",
"cycle_duration": 1,
"currency_id": cls.env.company.currency_id.id,
"entitlement_kind": "cash",
"max_amount": 5.0,
"entitlement_kind": "default",
}
)
cls.journal_id = cls._program_create_wiz.create_journal(
cls._program_create_wiz.name, cls._program_create_wiz.currency_id.id
)

# cls.program = cls.env["g2p.program"].create(
# {
# "name": cls._program_create_wiz.name,
# "journal_id": cls.journal_id,
# "target_type": cls._program_create_wiz.target_type,
# }
# )

def _update_program_create_wiz(self):
self._program_create_wiz.write(
{
"entitlement_cash_item_ids": [
(
0,
0,
{
"amount": 5.0,
},
),
],
}
)

def test_01_check_sql_query_onchange(self):
self._update_program_create_wiz()
self._program_create_wiz._sql_query_onchange()
self.assertEqual(
self._program_create_wiz.sql_query_valid,
Expand Down

0 comments on commit 3b587c6

Please sign in to comment.