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
Titouan Soulard
slapos.core
Commits
f15b1718
Commit
f15b1718
authored
Mar 01, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_payzen: test fix
parent
87f8c883
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 @
f15b1718
...
...
@@ -25,6 +25,7 @@ from DateTime import DateTime
from
zExceptions
import
Unauthorized
from
Products.ERP5Type.tests.utils
import
createZODBPythonScript
class
TestSlapOSCurrency_getIntegrationMapping
(
SlapOSTestCaseMixinWithAbort
):
def
test_integratedCurrency
(
self
):
...
...
@@ -712,16 +713,21 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
self
.
_dropPaymentTransaction_getVADSUrlDict
()
def
test_PaymentTransaction_redirectToManualPayzenPayment_redirect
(
self
):
person
=
self
.
makePerson
()
project
=
self
.
addProject
()
person
=
self
.
makePerson
(
project
)
invoice
=
self
.
createStoppedSaleInvoiceTransaction
(
destination_section
=
person
.
getRelativeUrl
())
destination_section_value
=
person
,
destination_project_value
=
project
)
self
.
tic
()
payment
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
"Payment Transaction"
,
payment_mode
=
'payzen'
,
causality_value
=
invoice
,
destination_section
=
invoice
.
getDestinationSection
(),
destination_section_value
=
invoice
.
getDestinationSectionValue
(),
destination_project_value
=
invoice
.
getDestinationProjectValue
(),
resource_value
=
self
.
portal
.
currency_module
.
EUR
,
ledger
=
"automated"
,
created_by_builder
=
1
# to prevent init script to create lines
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
payment
,
'started'
)
...
...
@@ -763,16 +769,21 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
len
(
system_event_list
[
0
].
contentValues
(
portal_type
=
"Payzen Event Message"
)),
1
)
def
test_PaymentTransaction_redirectToManualPayzenPayment_already_registered
(
self
):
person
=
self
.
makePerson
()
project
=
self
.
addProject
()
person
=
self
.
makePerson
(
project
)
invoice
=
self
.
createStoppedSaleInvoiceTransaction
(
destination_section
=
person
.
getRelativeUrl
())
destination_section_value
=
person
,
destination_project_value
=
project
)
self
.
tic
()
payment
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
"Payment Transaction"
,
payment_mode
=
'payzen'
,
causality_value
=
invoice
,
destination_section
=
invoice
.
getDestinationSection
(),
destination_section_value
=
invoice
.
getDestinationSectionValue
(),
destination_project_value
=
invoice
.
getDestinationProjectValue
(),
resource_value
=
self
.
portal
.
currency_module
.
EUR
,
ledger
=
"automated"
,
created_by_builder
=
1
# to prevent init script to create lines
)
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