Commit 23a99097 authored by Romain Courteaud's avatar Romain Courteaud

Use destroyed instead of deleted.

Stay consistent with current API
parent 6d6435b9
......@@ -70,8 +70,8 @@ try:\n
except KeyError:\n
raise TypeError, "Person_requestSoftwareInstance takes exactly 7 arguments"\n
\n
if state not in ["started", "stopped", "deleted"]:\n
raise ValueError, "state should be started, stopped or deleted"\n
if state not in ["started", "stopped", "destroyed"]:\n
raise ValueError, "state should be started, stopped or destroyed"\n
elif is_slave not in [True, False]:\n
raise ValueError, "shared should be a boolean"\n
\n
......@@ -97,8 +97,8 @@ if len(request_hosting_subscription_list) > 1:\n
raise NotImplementedError, "Too many hosting subscription %s found" % software_title\n
elif len(request_hosting_subscription_list) == 1:\n
request_hosting_subscription = request_hosting_subscription_list[0].getObject()\n
if request_hosting_subscription.getRootState() == "deleted":\n
raise NotImplementedError, "The system was not able to filter deleted hosting subscription"\n
if request_hosting_subscription.getRootState() == "destroyed":\n
raise NotImplementedError, "The system was not able to filter destroyed hosting subscription"\n
else:\n
request_hosting_subscription = None\n
\n
......
699
\ No newline at end of file
700
\ No newline at end of file
......@@ -138,7 +138,7 @@ class TestSlapOSCorePersonRequest(ERP5TypeTestCase):
shared = True
state = "started"
# Only started, stopped, deleted
# Only started, stopped, destroyed
self.assertRaises(ValueError, person.requestSoftwareInstance,
software_release=software_release,
software_title=software_title,
......@@ -175,15 +175,15 @@ class TestSlapOSCorePersonRequest(ERP5TypeTestCase):
person.requestSoftwareInstance(
software_release=software_release,
software_title="deleted",
software_title="destroyed",
software_type=software_type,
instance_xml=instance_xml,
sla_xml=sla_xml,
shared=shared,
state="deleted",
state="destroyed",
)
hosting_subscription = person.REQUEST.get('request_hosting_subscription')
self.assertEquals("deleted", hosting_subscription.getRootState())
self.assertEquals("destroyed", hosting_subscription.getRootState())
def test_Person_requestSoftwareInstance_returnHostingSubscriptionUrl(self):
person = self.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue()
......@@ -452,10 +452,10 @@ class TestSlapOSCorePersonRequest(ERP5TypeTestCase):
instance_xml=instance_xml,
sla_xml=sla_xml,
shared=shared,
state="deleted",
state="destroyed",
)
hosting_subscription = person.REQUEST.get('request_hosting_subscription')
self.assertEquals("deleted", hosting_subscription.getRootState())
self.assertEquals("destroyed", hosting_subscription.getRootState())
transaction.commit()
self.tic()
......
1
\ No newline at end of file
2
\ No newline at end of file
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