[TMP] Test

This commit is contained in:
michel 2018-01-15 14:13:22 +01:00
parent 985b5ec055
commit f21a7b303c

View File

@ -57,17 +57,15 @@ class TestGolemSeason(TransactionCase):
def test__onchange_season_dates(self): def test__onchange_season_dates(self):
""" Test if membership date """ """ Test if membership date """
# je cree un article adhésion
self.env['golem.season'].create({'name': 'Name', self.env['golem.season'].create({'name': 'Name',
'membership_id': 'test_membership_type', 'membership_id': 'Type adhesion',
'membership_date_from': '2017-11-01', 'date_start': '2017-11-01',
'membership_date_to': '2018-12-31'}) 'date_end': '2018-12-31'})
new_season = self.env['golem.season'].create({'name': name, # je cree une saison attachée a l'article adhésion
'membership_id': membership_id, new_season = self.env['golem.season'].create({'name': 'Name',
'date_start': membership_date_from, 'membership_id': 'Type adhesion'})
'date_end': membership_date_to}) # Je teste avec les dates
self.assertEqual(new_season._onchange_season_dates.date_start,'2017-11-01')
self.assertEqual(new_season._onchange_season_dates, self.assertEqual(new_season._onchange_season_dates.date_end,'2018-12-31')
'membership_id': 'test_membership_type',
'date_start': '2017-11-01',
'date_end': '2018-12-31')