Commit bd63c06f authored by Romain Courteaud's avatar Romain Courteaud

slapos_slap_tool: test: bypass subscription request

parent 973644c5
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (c) 2002-2012 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2002-2012 Nexedi SA and Contributors. All Rights Reserved.
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin, TemporaryAlarmScript
from DateTime import DateTime from DateTime import DateTime
from App.Common import rfc1123_date from App.Common import rfc1123_date
...@@ -3111,16 +3111,17 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin): ...@@ -3111,16 +3111,17 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
self.start_requested_software_instance.updateLocalRolesOnSecurityGroups() self.start_requested_software_instance.updateLocalRolesOnSecurityGroups()
self.tic() self.tic()
self.login(self.person_user_id) self.login(self.person_user_id)
response = self.portal_slap.requestComputerPartition( with TemporaryAlarmScript(self.portal, 'Item_getSubscriptionStatus', "'subscribed'"):
software_release=self.start_requested_software_instance.getUrlString(), response = self.portal_slap.requestComputerPartition(
software_type=self.start_requested_software_instance.getSourceReference(), software_release=self.start_requested_software_instance.getUrlString(),
partition_reference=self.start_requested_software_instance.getTitle(), software_type=self.start_requested_software_instance.getSourceReference(),
partition_parameter_xml='<marshal><dictionary id="i2"/></marshal>', partition_reference=self.start_requested_software_instance.getTitle(),
filter_xml='<marshal><dictionary id="i2"/></marshal>', partition_parameter_xml='<marshal><dictionary id="i2"/></marshal>',
state='<marshal><string>started</string></marshal>', filter_xml='<marshal><dictionary id="i2"/></marshal>',
shared_xml='<marshal><bool>0</bool></marshal>', state='<marshal><string>started</string></marshal>',
project_reference=self.project.getReference() shared_xml='<marshal><bool>0</bool></marshal>',
) project_reference=self.project.getReference()
)
self.assertEqual(type(response), str) self.assertEqual(type(response), str)
# check returned XML # check returned XML
got_xml = etree.tostring(etree.fromstring(response), got_xml = etree.tostring(etree.fromstring(response),
......
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