Commit 3fb08c40 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_crm/testSlapOSCRMSkins: Use _dropScript API from mixin instead repeat implementation

parent 6d36e12b
Pipeline #10802 failed with stage
in 0 seconds
......@@ -1219,13 +1219,6 @@ class TestSlapOSComputer_CheckState(TestCRMSkinsMixin):
"""return context.getPortalObject().REQUEST['_simulateBase_generateSupportRequestForSlapOS']""")
transaction.commit()
def _dropBase_generateSupportRequestForSlapOS(self):
script_name = 'Base_generateSupportRequestForSlapOS'
if script_name in self.portal.portal_skins.custom.objectIds():
self.portal.portal_skins.custom.manage_delObjects(script_name)
transaction.commit()
self.assertFalse(script_name in self.portal.portal_skins.custom.objectIds())
@simulate('ERP5Site_isSupportRequestCreationClosed', '*args, **kwargs','return 0')
def test_Computer_checkState_call_support_request(self):
computer = self._makeComputer(owner=self.makePerson(user=0))[0]
......@@ -1245,7 +1238,7 @@ class TestSlapOSComputer_CheckState(TestCRMSkinsMixin):
try:
computer_support_request = computer.Computer_checkState()
finally:
self._dropBase_generateSupportRequestForSlapOS()
self._dropScript("Base_generateSupportRequestForSlapOS")
self.assertEqual(support_request,
computer_support_request)
......@@ -1263,7 +1256,7 @@ class TestSlapOSComputer_CheckState(TestCRMSkinsMixin):
try:
computer_support_request = computer.Computer_checkState()
finally:
self._dropBase_generateSupportRequestForSlapOS()
self._dropScript("Base_generateSupportRequestForSlapOS")
self.assertEqual(support_request,
computer_support_request)
......
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