Commit f8420e10 authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: test: change class inheritance

do not inherit from a class with existing test, as it forces subclass to keep exactly the same test function name
parent d032c2fe
......@@ -11,7 +11,8 @@ from DateTime import DateTime
def convertCategoryList(base, l):
return ['%s/%s' % (base, q) for q in l]
class TestSlapOSSalePackingListBuilder(SlapOSTestCaseMixin):
class TestSlapOSBuilderMixin(SlapOSTestCaseMixin):
def checkSimulationMovement(self, simulation_movement):
self.assertEqual(1.0, simulation_movement.getDeliveryRatio())
......@@ -88,6 +89,9 @@ class TestSlapOSSalePackingListBuilder(SlapOSTestCaseMixin):
+ category_list,
delivery.getCategoryList())
class TestSlapOSSalePackingListBuilder(TestSlapOSBuilderMixin):
def test(self):
resource, _, _, _, _, instance_tree = self.bootstrapAllocableInstanceTree(is_accountable=True)
project = instance_tree.getFollowUpValue()
......@@ -172,7 +176,7 @@ class TestSlapOSSalePackingListBuilder(SlapOSTestCaseMixin):
self.checkDelivery(simulation_movement_2, delivery_2, **delivery_kw)
class TestSlapOSSaleInvoiceBuilder(TestSlapOSSalePackingListBuilder):
class TestSlapOSSaleInvoiceBuilder(TestSlapOSBuilderMixin):
def test(self, causality1=None, causality2=None): # pylint: disable=arguments-differ
resource, _, _, _, _, instance_tree = self.bootstrapAllocableInstanceTree(is_accountable=True)
......@@ -1105,7 +1109,7 @@ class TestSlapOSSaleInvoiceBuilder(TestSlapOSSalePackingListBuilder):
)
class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSBuilderMixin):
def checkSimulationMovement(self, simulation_movement):
self.assertNotEqual(0.0, simulation_movement.getDeliveryRatio())
self.assertEqual(0.0, simulation_movement.getDeliveryError())
......@@ -1635,7 +1639,7 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
self.assertEqual('solved', invoice_2.getCausalityState())
self.assertEqual('confirmed', invoice_2.getSimulationState())
class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingListBuilder):
class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSBuilderMixin):
def checkSimulationMovement(self, simulation_movement):
self.assertNotEqual(0.0, simulation_movement.getDeliveryRatio())
self.assertEqual(0.0, simulation_movement.getDeliveryError())
......
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