Commit 6b879110 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

slapos_subscription_request: Move tests to jIO API add legacy Tests class for SlapTool

parent 62f85140
......@@ -20,6 +20,7 @@
##############################################################################
from erp5.component.test.testSlapOSSubscriptionScenario import TestSlapOSSubscriptionScenarioMixin
from erp5.component.test.SlapOSTestCaseDefaultScenarioMixin import DefaultScenarioMixinSlapTool
class TestSlapOSSubscriptionCDNScenarioMixin(TestSlapOSSubscriptionScenarioMixin):
......@@ -66,18 +67,18 @@ class TestSlapOSSubscriptionCDNScenarioMixin(TestSlapOSSubscriptionScenarioMixin
self.login(self.admin_user.getUserId())
self.personRequestInstanceNotReady(
software_release=self.subscription_condition.getUrlString(),
software_release_uri=self.subscription_condition.getUrlString(),
software_type=self.subscription_condition.getSourceReference(),
partition_reference="InstanceForSlave%s" % self.new_id
title="InstanceForSlave%s" % self.new_id
)
self.stepCallSlaposAllocateInstanceAlarm()
self.tic()
self.personRequestInstance(
software_release=self.subscription_condition.getUrlString(),
software_release_uri=self.subscription_condition.getUrlString(),
software_type=self.subscription_condition.getSourceReference(),
partition_reference="InstanceForSlave%s" % self.new_id
title="InstanceForSlave%s" % self.new_id
)
# now instantiate it on compute_node and set some nice connection dict
......@@ -117,3 +118,9 @@ class TestSlapOSSubscriptionCDNScenario(TestSlapOSSubscriptionCDNScenarioMixin):
# Messages are in chinese, when subscribed via chinese website. Even if the english language is
# english
self._test_subscription_scenario_with_existing_user(amount=1, language="zh")
class TestSlapOSSubscriptionCDNScenarioSlapTool(
TestSlapOSSubscriptionCDNScenario,
DefaultScenarioMixinSlapTool
):
pass
\ No newline at end of file
......@@ -19,7 +19,7 @@
#
##############################################################################
from erp5.component.test.SlapOSTestCaseDefaultScenarioMixin import DefaultScenarioMixin
from erp5.component.test.SlapOSTestCaseDefaultScenarioMixin import DefaultScenarioMixin, DefaultScenarioMixinSlapTool
from erp5.component.test.SlapOSTestCaseMixin import changeSkin
from Products.ERP5Type.tests.utils import createZODBPythonScript
......@@ -1622,9 +1622,9 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
try:
self.login(self.normal_user.getUserId())
self.personRequestInstanceNotReady(
software_release=self.subscription_condition.getUrlString(),
software_release_uri=self.subscription_condition.getUrlString(),
software_type="default",
partition_reference="_test_subscription_scenario_with_existing_user_extra_instance",
title="_test_subscription_scenario_with_existing_user_extra_instance",
)
self.non_subscription_related_instance_amount = 1
......@@ -1838,3 +1838,9 @@ class TestSlapOSSubscriptionScenario(TestSlapOSSubscriptionScenarioMixin):
# Messages are in english, when subscribed via english website. Even if the chinese language is
# defined at user level.
self._test_subscription_scenario_with_existing_user(amount=1, language="zh")
class TestSlapOSSubscriptionScenarioSlapTool(
TestSlapOSSubscriptionScenario,
DefaultScenarioMixinSlapTool
):
pass
\ 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