Commit 5bc9c8f8 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_subscription_request: (test) Set pricing as zero to prevent create regularisation requests

   This with price not zero is covered by another tests.
parent 524190a5
...@@ -1616,6 +1616,16 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans ...@@ -1616,6 +1616,16 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
self.subscription_server = self.createPublicServerForAdminUser() self.subscription_server = self.createPublicServerForAdminUser()
# Disable on this test the pricing on the template to not generate debt before
# them expected
line = self.portal.open_sale_order_module.\
slapos_accounting_open_sale_order_line_template.\
slapos_accounting_open_sale_order_line_template
previous_price = line.getPrice()
line.setPrice(0.0)
try:
self.login(self.normal_user.getUserId()) self.login(self.normal_user.getUserId())
self.personRequestInstanceNotReady( self.personRequestInstanceNotReady(
software_release=self.subscription_condition.getUrlString(), software_release=self.subscription_condition.getUrlString(),
...@@ -1640,6 +1650,8 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans ...@@ -1640,6 +1650,8 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
self.destroyAndCheckSubscription( self.destroyAndCheckSubscription(
default_email_text, self.subscription_server default_email_text, self.subscription_server
) )
finally:
line.setPrice(previous_price)
return default_email_text, name return default_email_text, name
......
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