Commit 7ec6c261 authored by Luca Cristaldi's avatar Luca Cristaldi

Fix unit-test

parent 8fa60530
......@@ -77,21 +77,15 @@ Add membership to member::
>>> _ = member.memberships.new(
... membership_type=membership_type1,
... start_date = today + datetime.timedelta(weeks=4),
... end_date = today + datetime.timedelta(weeks=50),
... )
>>> _ = member.memberships.new(
... membership_type=membership_type2,
... start_date = today + datetime.timedelta(weeks=4),
... end_date = today + datetime.timedelta(weeks=50),
... )
>>> member.join_date = today + datetime.timedelta(weeks=6)
>>> member.leave_date = today + datetime.timedelta(weeks=35)
>>> member.save()
Enroll member::
>>> member.join_date = today
>>> member.join_date = today + relativedelta(month=1,day=1)
>>> member.click("run")
>>> member.save()
......@@ -99,7 +93,7 @@ Create fee lines::
>>> Fee = Model.get('association.membership.fee')
>>> create_fee = Wizard('association.membership.fee_create')
>>> create_fee.form.date = today + datetime.timedelta(weeks=40)
>>> create_fee.form.date = today + relativedelta(month=12)
>>> create_fee.execute('create_')
>>> len(Fee.find([])) > 0
True
......
......@@ -45,7 +45,7 @@ def create_membership_type(name, amount=Decimal(42), account=None,
for start, end in date_interval(start_date, relativedelta(months=1), 12):
membership_type.periods.new(
name=f"test {start:%b)}",
name=f"test {start:%b}",
start_date=start,
end_date=end,
amount=amount
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment