Commit 9f783dd9 authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: test: fix trade condition retrieval

parent aa33139c
......@@ -37,7 +37,7 @@ class TestDefaultInvoiceTransactionRule(SlapOSTestCaseMixin):
resource, _, _, _, _, aggregate = self.bootstrapAllocableInstanceTree(is_accountable=True)
project = aggregate.getFollowUpValue()
trade_condition = aggregate.getFollowUpValue().getSpecialiseValue()
trade_condition = project.getSourceProjectRelatedValue(portal_type="Sale Trade Condition")
source = trade_condition.getSourceSectionValue()
destination = aggregate.getDestinationSectionValue()
business_process = trade_condition.getSpecialiseValue()
......@@ -178,7 +178,7 @@ class TestDefaultInvoiceRule(SlapOSTestCaseMixin):
resource, _, _, _, _, aggregate = self.bootstrapAllocableInstanceTree(is_accountable=True)
project = aggregate.getFollowUpValue()
trade_condition = aggregate.getFollowUpValue().getSpecialiseValue()
trade_condition = project.getSourceProjectRelatedValue(portal_type="Sale Trade Condition")
source = trade_condition.getSourceSectionValue()
destination = aggregate.getDestinationSectionValue()
business_process = trade_condition.getSpecialiseValue()
......@@ -258,7 +258,7 @@ class TestDefaultInvoicingRule(SlapOSTestCaseMixin):
resource, _, _, _, _, aggregate = self.bootstrapAllocableInstanceTree(is_accountable=True)
project = aggregate.getFollowUpValue()
trade_condition = aggregate.getFollowUpValue().getSpecialiseValue()
trade_condition = project.getSourceProjectRelatedValue(portal_type="Sale Trade Condition")
source = trade_condition.getSourceSectionValue()
destination = aggregate.getDestinationSectionValue()
business_process = trade_condition.getSpecialiseValue()
......@@ -390,7 +390,7 @@ class TestDefaultPaymentRule(SlapOSTestCaseMixin):
_, _, _, _, _, aggregate = self.bootstrapAllocableInstanceTree(is_accountable=True)
project = aggregate.getFollowUpValue()
trade_condition = aggregate.getFollowUpValue().getSpecialiseValue()
trade_condition = project.getSourceProjectRelatedValue(portal_type="Sale Trade Condition")
source = trade_condition.getSourceSectionValue()
destination = aggregate.getDestinationSectionValue()
business_process = trade_condition.getSpecialiseValue()
......@@ -457,7 +457,7 @@ class TestHostingSubscriptionSimulation(SlapOSTestCaseMixin):
software_product, _, _, _, _, self.instance_tree = self.bootstrapAllocableInstanceTree(is_accountable=True, base_price=9)
project = software_product.getFollowUpValue()
trade_condition = project.getSpecialiseValue()
trade_condition = project.getSourceProjectRelatedValue(portal_type="Sale Trade Condition")
# This test expect no accounting.
# Disable this by not setting a source section on the trade condition
trade_condition.edit(source_section=None)
......@@ -715,7 +715,7 @@ class TestDefaultTradeModelRule(SlapOSTestCaseMixin):
resource, _, _, _, _, aggregate = self.bootstrapAllocableInstanceTree(is_accountable=True)
project = aggregate.getFollowUpValue()
trade_condition = aggregate.getFollowUpValue().getSpecialiseValue()
trade_condition = project.getSourceProjectRelatedValue(portal_type="Sale Trade Condition")
source = trade_condition.getSourceSectionValue()
destination = aggregate.getDestinationSectionValue()
price_currency = trade_condition.getPriceCurrencyValue()
......@@ -833,7 +833,7 @@ class TestDefaultDeliveryRule(SlapOSTestCaseMixin):
def test(self):
resource, _, _, _, _, aggregate = self.bootstrapAllocableInstanceTree(is_accountable=True)
project = aggregate.getFollowUpValue()
trade_condition = aggregate.getFollowUpValue().getSpecialiseValue()
trade_condition = project.getSourceProjectRelatedValue(portal_type="Sale Trade Condition")
source = trade_condition.getSourceSectionValue()
destination = aggregate.getDestinationSectionValue()
price_currency = trade_condition.getPriceCurrencyValue()
......@@ -924,7 +924,7 @@ class TestDefaultDeliveryRuleConsumption(SlapOSTestCaseMixin):
def test(self):
resource, _, _, _, _, aggregate = self.bootstrapAllocableInstanceTree(is_accountable=True)
project = aggregate.getFollowUpValue()
trade_condition = aggregate.getFollowUpValue().getSpecialiseValue()
trade_condition = project.getSourceProjectRelatedValue(portal_type="Sale Trade Condition")
source = trade_condition.getSourceSectionValue()
destination = aggregate.getDestinationSectionValue()
price_currency = trade_condition.getPriceCurrencyValue()
......
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