Commit 17a68121 authored by Romain Courteaud's avatar Romain Courteaud 🐙

slapos_accounting: disable packing list generation from tio xml

this is not critical for now, and will be upgraded later
parent db05e82c
return "disabled as not matching yet the virtual master design"
portal = context.getPortalObject() portal = context.getPortalObject()
portal.portal_catalog.searchAndActivate( portal.portal_catalog.searchAndActivate(
......
return "disabled as not matching yet the virtual master design"
from zExceptions import Unauthorized from zExceptions import Unauthorized
if REQUEST is not None: if REQUEST is not None:
raise Unauthorized raise Unauthorized
...@@ -20,7 +22,7 @@ if tioxml_dict is None: ...@@ -20,7 +22,7 @@ if tioxml_dict is None:
else: else:
compute_node = context.getContributorValue(portal_type="Compute Node") compute_node = context.getContributorValue(portal_type="Compute Node")
compute_node_project_document = compute_node.Item_getCurrentProjectValue() compute_node_project_document = compute_node.getFollowUpValue()
delivery_title = tioxml_dict['title'] delivery_title = tioxml_dict['title']
compute_node_project = None compute_node_project = None
......
...@@ -30,6 +30,7 @@ import transaction ...@@ -30,6 +30,7 @@ import transaction
from functools import wraps from functools import wraps
from Products.ERP5Type.tests.utils import createZODBPythonScript from Products.ERP5Type.tests.utils import createZODBPythonScript
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin, withAbort, TemporaryAlarmScript from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin, withAbort, TemporaryAlarmScript
from unittest import expectedFailure
import os import os
...@@ -520,6 +521,7 @@ class TestSlapOSGeneratePackingListFromTioXML(SlapOSTestCaseMixin): ...@@ -520,6 +521,7 @@ class TestSlapOSGeneratePackingListFromTioXML(SlapOSTestCaseMixin):
) )
return document return document
@expectedFailure
def test_ComputerConsumptionTioXMLFile_solveInvoicingGeneration_alarm(self): def test_ComputerConsumptionTioXMLFile_solveInvoicingGeneration_alarm(self):
document = self.createTioXMLFile() document = self.createTioXMLFile()
document.submit() document.submit()
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
from erp5.component.test.SlapOSTestCaseMixin import \ from erp5.component.test.SlapOSTestCaseMixin import \
SlapOSTestCaseMixinWithAbort, SlapOSTestCaseMixin, simulate SlapOSTestCaseMixinWithAbort, SlapOSTestCaseMixin, simulate
from zExceptions import Unauthorized from zExceptions import Unauthorized
from unittest import expectedFailure
class TestSlapOSComputeNode_reportComputeNodeConsumption(SlapOSTestCaseMixinWithAbort): class TestSlapOSComputeNode_reportComputeNodeConsumption(SlapOSTestCaseMixinWithAbort):
...@@ -323,6 +324,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration( ...@@ -323,6 +324,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration(
return self.compute_node return self.compute_node
@expectedFailure
def test_solveInvoicingGeneration_REQUEST_disallowed(self): def test_solveInvoicingGeneration_REQUEST_disallowed(self):
document = self.createTioXMLFile() document = self.createTioXMLFile()
self.assertRaises( self.assertRaises(
...@@ -330,6 +332,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration( ...@@ -330,6 +332,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration(
document.ComputerConsumptionTioXMLFile_solveInvoicingGeneration, document.ComputerConsumptionTioXMLFile_solveInvoicingGeneration,
REQUEST={}) REQUEST={})
@expectedFailure
@simulate('ComputerConsumptionTioXMLFile_parseXml', @simulate('ComputerConsumptionTioXMLFile_parseXml',
'*args, **kwargs', '*args, **kwargs',
'return None') 'return None')
...@@ -352,6 +355,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration( ...@@ -352,6 +355,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration(
'category': "caté", 'category': "caté",
}], }],
} }
@expectedFailure
@simulate('ComputerConsumptionTioXMLFile_parseXml', @simulate('ComputerConsumptionTioXMLFile_parseXml',
'*args, **kwargs', '*args, **kwargs',
"return %s" % tio_dict) "return %s" % tio_dict)
...@@ -409,6 +413,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration( ...@@ -409,6 +413,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration(
'category': "caté", 'category': "caté",
}], }],
} }
@expectedFailure
@simulate('ComputerConsumptionTioXMLFile_parseXml', @simulate('ComputerConsumptionTioXMLFile_parseXml',
'*args, **kwargs', '*args, **kwargs',
"return %s" % tio_dict) "return %s" % tio_dict)
...@@ -475,6 +480,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration( ...@@ -475,6 +480,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration(
'category': "caté", 'category': "caté",
}], }],
} }
@expectedFailure
@simulate('ComputerConsumptionTioXMLFile_parseXml', @simulate('ComputerConsumptionTioXMLFile_parseXml',
'*args, **kwargs', '*args, **kwargs',
"return %s" % tio_dict) "return %s" % tio_dict)
...@@ -556,6 +562,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration( ...@@ -556,6 +562,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration(
'category': "caté", 'category': "caté",
}], }],
} }
@expectedFailure
@simulate('ComputerConsumptionTioXMLFile_parseXml', @simulate('ComputerConsumptionTioXMLFile_parseXml',
'*args, **kwargs', '*args, **kwargs',
"return %s" % tio_dict) "return %s" % tio_dict)
......
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