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
b8785971
Commit
b8785971
authored
Feb 26, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_subscription_request: Update test.
parent
175eb04a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionSkins.py
...ortal_components/test.erp5.testSlapOSSubscriptionSkins.py
+8
-6
No files found.
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionSkins.py
View file @
b8785971
...
@@ -493,10 +493,11 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix
...
@@ -493,10 +493,11 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix
invoice_template
=
self
.
portal
.
restrictedTraverse
(
invoice_template_path
)
invoice_template
=
self
.
portal
.
restrictedTraverse
(
invoice_template_path
)
current_invoice
=
invoice_template
.
Base_createCloneDocument
(
batch_mode
=
1
)
current_invoice
=
invoice_template
.
Base_createCloneDocument
(
batch_mode
=
1
)
subscription_request
.
edit
(
causality_value
=
current_invoice
)
subscription_request
.
edit
(
causality_value
=
current_invoice
,
quantity
=
1
)
self
.
assertEqual
(
None
,
self
.
assertEqual
(
None
,
subscription_request
.
SubscriptionRequest_requestPaymentTransaction
(
"
1"
,
"
xx"
,
"en"
))
subscription_request
.
SubscriptionRequest_requestPaymentTransaction
(
"xx"
,
"en"
))
def
_test_request_payment_transaction
(
self
,
quantity
):
def
_test_request_payment_transaction
(
self
,
quantity
):
email
=
"abc%s@nexedi.com"
%
self
.
new_id
email
=
"abc%s@nexedi.com"
%
self
.
new_id
...
@@ -509,7 +510,8 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix
...
@@ -509,7 +510,8 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix
quantity
=
quantity
,
destination_section_value
=
person
,
quantity
=
quantity
,
destination_section_value
=
person
,
default_email_text
=
"abc%s@nexedi.com"
%
self
.
new_id
)
default_email_text
=
"abc%s@nexedi.com"
%
self
.
new_id
)
current_payment
=
subscription_request
.
SubscriptionRequest_requestPaymentTransaction
(
quantity
,
"TAG"
,
"en"
)
subscription_request
.
setQuantity
(
quantity
)
current_payment
=
subscription_request
.
SubscriptionRequest_requestPaymentTransaction
(
"TAG"
,
"en"
)
self
.
tic
()
self
.
tic
()
self
.
assertNotEqual
(
None
,
current_payment
)
self
.
assertNotEqual
(
None
,
current_payment
)
self
.
assertEqual
(
current_payment
.
getTitle
(),
"Payment for Reservation Fee"
)
self
.
assertEqual
(
current_payment
.
getTitle
(),
"Payment for Reservation Fee"
)
...
@@ -540,7 +542,7 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix
...
@@ -540,7 +542,7 @@ class TestSubscriptionRequest_requestPaymentTransaction(TestSubscriptionSkinsMix
quantity
=
quantity
,
destination_section_value
=
person
,
quantity
=
quantity
,
destination_section_value
=
person
,
default_email_text
=
"abc%s@nexedi.com"
%
self
.
new_id
)
default_email_text
=
"abc%s@nexedi.com"
%
self
.
new_id
)
current_payment
=
subscription_request
.
SubscriptionRequest_requestPaymentTransaction
(
quantity
,
"TAG"
,
"zh"
)
current_payment
=
subscription_request
.
SubscriptionRequest_requestPaymentTransaction
(
"TAG"
,
"zh"
)
self
.
tic
()
self
.
tic
()
self
.
assertNotEqual
(
None
,
current_payment
)
self
.
assertNotEqual
(
None
,
current_payment
)
self
.
assertEqual
(
current_payment
.
getTitle
(),
"Payment for Reservation Fee"
)
self
.
assertEqual
(
current_payment
.
getTitle
(),
"Payment for Reservation Fee"
)
...
@@ -636,7 +638,7 @@ class TestSubscriptionRequest_createRelatedSaleInvoiceTransaction(TestSubscripti
...
@@ -636,7 +638,7 @@ class TestSubscriptionRequest_createRelatedSaleInvoiceTransaction(TestSubscripti
# The SubscriptionRequest_createRelatedSaleInvoiceTransaction is invoked up, as it proven on
# The SubscriptionRequest_createRelatedSaleInvoiceTransaction is invoked up, as it proven on
# test TestSubscriptionRequest_requestPaymentTransaction, so let's keep it simple, and just reinvoke
# test TestSubscriptionRequest_requestPaymentTransaction, so let's keep it simple, and just reinvoke
current_payment
=
subscription_request
.
SubscriptionRequest_requestPaymentTransaction
(
quantity
,
"TAG"
,
"en"
)
current_payment
=
subscription_request
.
SubscriptionRequest_requestPaymentTransaction
(
"TAG"
,
"en"
)
self
.
tic
()
self
.
tic
()
...
@@ -1175,7 +1177,7 @@ class TestSubscriptionRequest_processOrdered(TestSubscriptionSkinsMixin):
...
@@ -1175,7 +1177,7 @@ class TestSubscriptionRequest_processOrdered(TestSubscriptionSkinsMixin):
# The SubscriptionRequest_createRelatedSaleInvoiceTransaction is invoked up, as it proven on
# The SubscriptionRequest_createRelatedSaleInvoiceTransaction is invoked up, as it proven on
# test TestSubscriptionRequest_requestPaymentTransaction, so let's keep it simple, and just reinvoke
# test TestSubscriptionRequest_requestPaymentTransaction, so let's keep it simple, and just reinvoke
current_payment
=
subscription_request
.
SubscriptionRequest_requestPaymentTransaction
(
1
,
"TAG"
,
"en"
)
current_payment
=
subscription_request
.
SubscriptionRequest_requestPaymentTransaction
(
"TAG"
,
"en"
)
self
.
assertNotEqual
(
current_payment
,
None
)
self
.
assertNotEqual
(
current_payment
,
None
)
self
.
tic
()
self
.
tic
()
...
...
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