Commit 5b056666 authored by Titouan Soulard's avatar Titouan Soulard Committed by Romain Courteaud

slapos_jio_api_style: add alarm script to tests

parent ea2d719f
......@@ -25,7 +25,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin, TemporaryAlarmScript
from DateTime import DateTime
......@@ -1508,13 +1508,14 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJIOAPIMixin):
self.callUpdateRevision()
self.tic()
self.login(self.person_user_id)
instance_dict = self.postToApi({
"portal_type": "Software Instance",
"software_release_uri": instance.getUrlString(),
"software_type": instance.getSourceReference(),
"title": instance.getTitle(),
"project_reference": self.project.getReference()
})
with TemporaryAlarmScript(self.portal, 'Item_getSubscriptionStatus', "'subscribed'"):
instance_dict = self.postToApi({
"portal_type": "Software Instance",
"software_release_uri": instance.getUrlString(),
"software_type": instance.getSourceReference(),
"title": instance.getTitle(),
"project_reference": self.project.getReference()
})
response = self.portal.REQUEST.RESPONSE
if 201 != response.getStatus():
......
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