Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ophélie Gagnard
slapos.core
Commits
c9f03d44
Commit
c9f03d44
authored
Apr 16, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_subscription_request: Update test since the API changed
parent
c1baaf12
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
21 deletions
+35
-21
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionCancellationScenario.py
...s/test.erp5.testSlapOSSubscriptionCancellationScenario.py
+12
-10
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionDualOrganisationScenario.py
...st.erp5.testSlapOSSubscriptionDualOrganisationScenario.py
+6
-5
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionSkins.py
...ortal_components/test.erp5.testSlapOSSubscriptionSkins.py
+17
-6
No files found.
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionCancellationScenario.py
View file @
c9f03d44
...
@@ -58,13 +58,14 @@ class TestSlapOSSubscriptionCancellationScenario(TestSlapOSSubscriptionScenarioM
...
@@ -58,13 +58,14 @@ class TestSlapOSSubscriptionCancellationScenario(TestSlapOSSubscriptionScenarioM
amount
=
1
amount
=
1
self
.
logout
()
self
.
logout
()
user_input_dict
=
{
"name"
:
name
,
"amount"
:
amount
}
self
.
_requestSubscription
(
self
.
_requestSubscription
(
subscription_reference
=
self
.
subscription_condition
.
getReference
(),
subscription_reference
=
self
.
subscription_condition
.
getReference
(),
amount
=
amount
,
user_input_dict
=
user_input_dict
,
name
=
name
,
email
=
default_email_text
,
default_email_text
=
default_email_text
,
confirmation_required
=
False
)
confirmation_required
=
False
,
REQUEST
=
self
.
portal
.
REQUEST
)
self
.
login
()
self
.
login
()
# I'm not sure if this is realistic
# I'm not sure if this is realistic
...
@@ -116,13 +117,14 @@ class TestSlapOSSubscriptionCancellationScenario(TestSlapOSSubscriptionScenarioM
...
@@ -116,13 +117,14 @@ class TestSlapOSSubscriptionCancellationScenario(TestSlapOSSubscriptionScenarioM
amount
=
1
amount
=
1
self
.
logout
()
self
.
logout
()
user_input_dict
=
{
"name"
:
name
,
"amount"
:
amount
}
self
.
_requestSubscription
(
self
.
_requestSubscription
(
subscription_reference
=
self
.
subscription_condition
.
getReference
(),
subscription_reference
=
self
.
subscription_condition
.
getReference
(),
amount
=
amount
,
user_input_dict
=
user_input_dict
,
name
=
name
,
email
=
default_email_text
,
default_email_text
=
default_email_text
,
confirmation_required
=
False
)
confirmation_required
=
False
,
REQUEST
=
self
.
portal
.
REQUEST
)
self
.
login
()
self
.
login
()
# I'm not sure if this is realistic
# I'm not sure if this is realistic
...
...
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionDualOrganisationScenario.py
View file @
c9f03d44
...
@@ -59,13 +59,14 @@ class testSlapOSSubscriptionDualOrganisationScenario(TestSlapOSSubscriptionScena
...
@@ -59,13 +59,14 @@ class testSlapOSSubscriptionDualOrganisationScenario(TestSlapOSSubscriptionScena
self
.
logout
()
self
.
logout
()
user_input_dict
=
{
"name"
:
name
,
"amount"
:
amount
}
request_kw
=
dict
(
request_kw
=
dict
(
subscription_reference
=
self
.
subscription_condition
.
getReference
(),
subscription_reference
=
self
.
subscription_condition
.
getReference
(),
amount
=
amount
,
user_input_dict
=
user_input_dict
,
name
=
name
,
email
=
default_email_text
,
default_email_text
=
default_email_text
,
confirmation_required
=
False
)
confirmation_required
=
False
,
REQUEST
=
self
.
portal
.
REQUEST
)
all_subscription_requested_list
=
[]
all_subscription_requested_list
=
[]
for
language
in
language_list
:
for
language
in
language_list
:
...
...
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionSkins.py
View file @
c9f03d44
...
@@ -1066,6 +1066,14 @@ class TestSubscriptionRequest_processOrdered(TestSubscriptionSkinsMixin):
...
@@ -1066,6 +1066,14 @@ class TestSubscriptionRequest_processOrdered(TestSubscriptionSkinsMixin):
root_slave
=
False
,
root_slave
=
False
,
source_reference
=
"test_for_test_123"
)
source_reference
=
"test_for_test_123"
)
self
.
tic
()
self
.
assertEqual
(
subscription_request
.
SubscriptionRequest_processOrdered
(),
None
)
subscription_request
.
plan
()
subscription_request
.
order
()
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
self
.
assertEqual
(
subscription_request
.
SubscriptionRequest_processOrdered
(),
subscription_request
.
SubscriptionRequest_processOrdered
(),
...
@@ -1110,7 +1118,7 @@ class TestSubscriptionRequest_processOrdered(TestSubscriptionSkinsMixin):
...
@@ -1110,7 +1118,7 @@ class TestSubscriptionRequest_processOrdered(TestSubscriptionSkinsMixin):
self
.
assertEqual
(
self
.
assertEqual
(
subscription_request
.
getSimulationState
(),
subscription_request
.
getSimulationState
(),
"
draft
"
"
ordered
"
)
)
@
simulate
(
'SubscriptionRequest_verifyPaymentBalanceIsReady'
,
'*args, **kwrgs'
,
'return None'
)
@
simulate
(
'SubscriptionRequest_verifyPaymentBalanceIsReady'
,
'*args, **kwrgs'
,
'return None'
)
...
@@ -1141,6 +1149,13 @@ class TestSubscriptionRequest_processOrdered(TestSubscriptionSkinsMixin):
...
@@ -1141,6 +1149,13 @@ class TestSubscriptionRequest_processOrdered(TestSubscriptionSkinsMixin):
current_payment
=
subscription_request
.
SubscriptionRequest_requestPaymentTransaction
(
"TAG"
,
"en"
)
current_payment
=
subscription_request
.
SubscriptionRequest_requestPaymentTransaction
(
"TAG"
,
"en"
)
self
.
assertNotEqual
(
current_payment
,
None
)
self
.
assertNotEqual
(
current_payment
,
None
)
self
.
tic
()
self
.
assertEqual
(
subscription_request
.
SubscriptionRequest_processOrdered
(),
None
)
subscription_request
.
plan
()
subscription_request
.
order
()
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
self
.
assertEqual
(
subscription_request
.
SubscriptionRequest_processOrdered
(),
'Skipped (Instance Requested)'
)
subscription_request
.
SubscriptionRequest_processOrdered
(),
'Skipped (Instance Requested)'
)
...
@@ -1181,7 +1196,7 @@ class TestSubscriptionRequest_processOrdered(TestSubscriptionSkinsMixin):
...
@@ -1181,7 +1196,7 @@ class TestSubscriptionRequest_processOrdered(TestSubscriptionSkinsMixin):
self
.
assertEqual
(
self
.
assertEqual
(
subscription_request
.
getSimulationState
(),
subscription_request
.
getSimulationState
(),
"
draft
"
"
ordered
"
)
)
@
simulate
(
'SubscriptionRequest_verifyPaymentBalanceIsReady'
,
'*args, **kwrgs'
,
'return context.fake_payment'
)
@
simulate
(
'SubscriptionRequest_verifyPaymentBalanceIsReady'
,
'*args, **kwrgs'
,
'return context.fake_payment'
)
...
@@ -1237,10 +1252,6 @@ class TestSubscriptionRequest_processOrdered(TestSubscriptionSkinsMixin):
...
@@ -1237,10 +1252,6 @@ class TestSubscriptionRequest_processOrdered(TestSubscriptionSkinsMixin):
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
'solved'
,
hosting_subscription
.
getCausalityState
())
self
.
assertEqual
(
'solved'
,
hosting_subscription
.
getCausalityState
())
self
.
assertEqual
(
subscription_request
.
SubscriptionRequest_processOrdered
(),
"Skipped (User isn't notified)"
)
self
.
tic
()
self
.
assertEqual
(
self
.
assertEqual
(
subscription_request
.
getSimulationState
(),
subscription_request
.
getSimulationState
(),
"confirmed"
"confirmed"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment