Commit fdfd697d authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Eteri

SimulationTool: Remove input/output perimeter definition.

As per Jérome, who implemented the test, it was written to test the
current state rather than testing the desired outcome. And it makes
little sense to have (and test for) 100 being present in both debit and
credit columns ("normal" lines), and 0 to be present in the stat line.

Update test to check for a more consistent outcome.
Acked-by: Jérome Perrin's avatarJérome Perrin <jerome@nexedi.com>
parent f7789f3e
......@@ -46,7 +46,7 @@ from Products.ERP5 import DeliverySolver
from Products.ERP5 import TargetSolver
from Products.PythonScripts.Utility import allow_class
from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery, SimpleQuery, SQLQuery
from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery, SimpleQuery
from Shared.DC.ZRDB.Results import Results
from Products.ERP5Type.Utils import mergeZRDBResults
......@@ -464,15 +464,8 @@ class SimulationTool(BaseTool):
if simulation_query is not None:
query_list.append(simulation_query)
return ComplexQuery(
SQLQuery("%(query_table)s.node_uid <> %(query_table)s.mirror_node_uid "
"OR %(query_table)s.section_uid <> %(query_table)s.mirror_section_uid "
"OR %(query_table)s.mirror_node_uid IS NULL "
"OR %(query_table)s.mirror_section_uid IS NULL "
"OR %(query_table)s.payment_uid IS NOT NULL" % {
'query_table': table,
}),
query_list,
logical_operator='AND',
*query_list
)
return simulation_query
simulation_query = getSimulationQuery(
......
......@@ -2148,7 +2148,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
credit_price=0,)
self.assertTrue(line_list[-1].isStatLine())
self.checkLineProperties(line_list[-1], debit_price=0, credit_price=0,)
self.checkLineProperties(line_list[-1], debit_price=100, credit_price=100)
def testAccountStatementMultipleSection(self):
......
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