forked from Yaltik/golem
[TMP] Test OK ?
This commit is contained in:
parent
126509768d
commit
5143c1d985
@ -57,16 +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
|
membership = self.env['product.template'].create({'name': 'Name',
|
||||||
membership_id = self.env['product.template'].create({'display_name': 'Name',
|
'membership_id': 'truc',
|
||||||
'membership_date_from': '2009-11-01',
|
'membership_date_from': '2017-11-01',
|
||||||
'membership_date_to': '2010-11-01'})
|
'membership_date_to': '2018-11-01'})
|
||||||
|
|
||||||
# je cree une saison attachée a l'article adhésion
|
|
||||||
new_season = self.env['golem.season'].create({'name': 'Name',
|
new_season = self.env['golem.season'].create({'name': 'Name',
|
||||||
'membership_id': membership_id})
|
'membership_id': membership.id})
|
||||||
|
|
||||||
new_season._onchange_season_dates()
|
new_season._onchange_season_dates()
|
||||||
# Je teste avec les dates
|
|
||||||
self.assertEqual(new_season.date_start, membership_id.membership_date_from)
|
self.assertEqual(new_season.date_start, membership.membership_date_from)
|
||||||
self.assertEqual(new_season.date_end, membership_id.membership_date_to)
|
self.assertEqual(new_season.date_end, membership.membership_date_to)
|
||||||
|
Loading…
Reference in New Issue
Block a user