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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
22660480
Commit
22660480
authored
Mar 01, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_payzen: test fix
parent
8ea91f7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
master/bt5/slapos_payzen/TestTemplateItem/portal_components/test.erp5.testSlapOSPayzenSkins.py
...Item/portal_components/test.erp5.testSlapOSPayzenSkins.py
+17
-6
No files found.
master/bt5/slapos_payzen/TestTemplateItem/portal_components/test.erp5.testSlapOSPayzenSkins.py
View file @
22660480
...
@@ -25,6 +25,7 @@ from DateTime import DateTime
...
@@ -25,6 +25,7 @@ from DateTime import DateTime
from
zExceptions
import
Unauthorized
from
zExceptions
import
Unauthorized
from
Products.ERP5Type.tests.utils
import
createZODBPythonScript
from
Products.ERP5Type.tests.utils
import
createZODBPythonScript
class
TestSlapOSCurrency_getIntegrationMapping
(
SlapOSTestCaseMixinWithAbort
):
class
TestSlapOSCurrency_getIntegrationMapping
(
SlapOSTestCaseMixinWithAbort
):
def
test_integratedCurrency
(
self
):
def
test_integratedCurrency
(
self
):
...
@@ -727,16 +728,21 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
...
@@ -727,16 +728,21 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
def
test_PaymentTransaction_redirectToManualPayzenPayment_redirect
(
self
):
def
test_PaymentTransaction_redirectToManualPayzenPayment_redirect
(
self
):
self
.
portal
.
portal_secure_payments
.
slapos_payzen_test
.
setReference
(
"PSERV-Payzen-Test"
)
self
.
portal
.
portal_secure_payments
.
slapos_payzen_test
.
setReference
(
"PSERV-Payzen-Test"
)
self
.
tic
()
self
.
tic
()
person
=
self
.
makePerson
()
project
=
self
.
addProject
()
person
=
self
.
makePerson
(
project
)
invoice
=
self
.
createStoppedSaleInvoiceTransaction
(
invoice
=
self
.
createStoppedSaleInvoiceTransaction
(
destination_section
=
person
.
getRelativeUrl
())
destination_section_value
=
person
,
destination_project_value
=
project
)
self
.
tic
()
self
.
tic
()
payment
=
self
.
portal
.
accounting_module
.
newContent
(
payment
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
"Payment Transaction"
,
portal_type
=
"Payment Transaction"
,
payment_mode
=
'payzen'
,
payment_mode
=
'payzen'
,
causality_value
=
invoice
,
causality_value
=
invoice
,
destination_section
=
invoice
.
getDestinationSection
(),
destination_section_value
=
invoice
.
getDestinationSectionValue
(),
destination_project_value
=
invoice
.
getDestinationProjectValue
(),
resource_value
=
self
.
portal
.
currency_module
.
EUR
,
resource_value
=
self
.
portal
.
currency_module
.
EUR
,
ledger
=
"automated"
,
created_by_builder
=
1
# to prevent init script to create lines
created_by_builder
=
1
# to prevent init script to create lines
)
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
payment
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
payment
,
'started'
)
...
@@ -778,16 +784,21 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
...
@@ -778,16 +784,21 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
len
(
system_event_list
[
0
].
contentValues
(
portal_type
=
"Payzen Event Message"
)),
1
)
len
(
system_event_list
[
0
].
contentValues
(
portal_type
=
"Payzen Event Message"
)),
1
)
def
test_PaymentTransaction_redirectToManualPayzenPayment_already_registered
(
self
):
def
test_PaymentTransaction_redirectToManualPayzenPayment_already_registered
(
self
):
person
=
self
.
makePerson
()
project
=
self
.
addProject
()
person
=
self
.
makePerson
(
project
)
invoice
=
self
.
createStoppedSaleInvoiceTransaction
(
invoice
=
self
.
createStoppedSaleInvoiceTransaction
(
destination_section
=
person
.
getRelativeUrl
())
destination_section_value
=
person
,
destination_project_value
=
project
)
self
.
tic
()
self
.
tic
()
payment
=
self
.
portal
.
accounting_module
.
newContent
(
payment
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
"Payment Transaction"
,
portal_type
=
"Payment Transaction"
,
payment_mode
=
'payzen'
,
payment_mode
=
'payzen'
,
causality_value
=
invoice
,
causality_value
=
invoice
,
destination_section
=
invoice
.
getDestinationSection
(),
destination_section_value
=
invoice
.
getDestinationSectionValue
(),
destination_project_value
=
invoice
.
getDestinationProjectValue
(),
resource_value
=
self
.
portal
.
currency_module
.
EUR
,
resource_value
=
self
.
portal
.
currency_module
.
EUR
,
ledger
=
"automated"
,
created_by_builder
=
1
# to prevent init script to create lines
created_by_builder
=
1
# to prevent init script to create lines
)
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
payment
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
payment
,
'started'
)
...
...
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