Skip to content

Commit

Permalink
- tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasProgrammer committed Oct 10, 2023
1 parent c521c14 commit ad89c14
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions subscription_oca/tests/test_subscription_oca.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,19 @@ def setUpClass(cls):
"product_id": cls.product_1.id,
}
)
cls.sub_line2 = cls.env["sale.subscription.line"].create(
{
"company_id": 1,
"sale_subscription_id": cls.sub.id,
}
)
cls.close_reason = cls.env["sale.subscription.close.reason"].create(
{
"name": "Test Close Reason",
}
)
cls.sub_line2.read(["name", "price_unit"])
cls.sub_line2.unlink()

def test_subscription_oca_sale_order(self):
# SO standard flow
Expand Down Expand Up @@ -194,3 +202,11 @@ def test_misc(self):
sale_order.get_next_interval(
self.tmpl.recurring_rule_type, self.tmpl.recurring_interval
)
self.sub_line.sale_subscription_id.pricelist_id.discount_policy = (
"without_discount"
)
self.sub_line.product_uom_qty = 100
self.env.user.groups_id = [
(4, self.env.ref("product.group_discount_per_so_line").id)
]
self.sub_line.read(["discount"])

0 comments on commit ad89c14

Please sign in to comment.