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