Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Fix test script for membership_prorate_variable_period module #31

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_create_invoice_membership_product_prorate_fixed(self):

def test_create_invoice_membership_product_prorate_week(self):
invoice = self.create_invoice("2015-01-01") # It's thursday
self.assertAlmostEqual(invoice.invoice_line_ids[0].quantity, 0.43, 2)
self.assertAlmostEqual(invoice.invoice_line_ids[0].quantity, 0.57, 2)
self.assertTrue(self.partner.member_lines)
self.assertEqual(self.partner.member_lines[0].state, "waiting")
self.assertEqual(
Expand All @@ -77,7 +77,7 @@ def test_create_invoice_membership_product_prorate_week(self):
def test_create_invoice_membership_product_prorate_month(self):
self.product.membership_interval_unit = "months"
invoice = self.create_invoice("2015-04-15")
self.assertAlmostEqual(invoice.invoice_line_ids[0].quantity, 0.5, 2)
self.assertAlmostEqual(invoice.invoice_line_ids[0].quantity, 0.53, 2)
self.assertTrue(self.partner.member_lines)
self.assertEqual(self.partner.member_lines[0].state, "waiting")
self.assertEqual(
Expand Down
Loading