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
Jérome Perrin
slapos.core
Commits
87dacc26
Commit
87dacc26
authored
Sep 04, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test new way.
parent
038fd1bf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
6 deletions
+27
-6
master/bt5/vifib_erp5/TestTemplateItem/testVifibPayZen.py
master/bt5/vifib_erp5/TestTemplateItem/testVifibPayZen.py
+26
-5
master/bt5/vifib_erp5/bt/revision
master/bt5/vifib_erp5/bt/revision
+1
-1
No files found.
master/bt5/vifib_erp5/TestTemplateItem/testVifibPayZen.py
View file @
87dacc26
...
@@ -30,7 +30,7 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin):
...
@@ -30,7 +30,7 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin):
self
.
assertEqual
(
message
.
getTitle
(),
'Shown Page'
)
self
.
assertEqual
(
message
.
getTitle
(),
'Shown Page'
)
self
.
assertEqual
(
message
.
getTextContent
(),
sequence
[
'payment_page'
])
self
.
assertEqual
(
message
.
getTextContent
(),
sequence
[
'payment_page'
])
def
stepCheckPayment
Page
(
self
,
sequence
):
def
getExpectedUser
Page
(
self
,
sequence
):
callback
=
self
.
portal
.
web_site_module
.
hosting
.
payzen_callback
callback
=
self
.
portal
.
web_site_module
.
hosting
.
payzen_callback
query
=
make_query
(
dict
(
transaction
=
sequence
[
'payment'
].
getRelativeUrl
()))
query
=
make_query
(
dict
(
transaction
=
sequence
[
'payment'
].
getRelativeUrl
()))
integration_site
=
self
.
portal
.
restrictedTraverse
(
self
.
portal
\
integration_site
=
self
.
portal
.
restrictedTraverse
(
self
.
portal
\
...
@@ -64,6 +64,7 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin):
...
@@ -64,6 +64,7 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin):
self
.
portal
.
portal_secure_payments
.
vifib_payzen
.
_getFieldList
(
data_dict
)
self
.
portal
.
portal_secure_payments
.
vifib_payzen
.
_getFieldList
(
data_dict
)
data_dict
[
'action'
]
=
self
.
portal
.
portal_secure_payments
\
data_dict
[
'action'
]
=
self
.
portal
.
portal_secure_payments
\
.
vifib_payzen
.
default_link
.
getUrlString
()
.
vifib_payzen
.
default_link
.
getUrlString
()
expected
=
\
expected
=
\
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w'
\
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w'
\
'3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
\
n
<html xmlns="http://www.w3.or'
\
'3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
\
n
<html xmlns="http://www.w3.or'
\
...
@@ -96,6 +97,10 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin):
...
@@ -96,6 +97,10 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin):
' <input type="hidden" name="vads_amount" value="%(vads_amount)s">
\
n
\
n
\
n
'
\
' <input type="hidden" name="vads_amount" value="%(vads_amount)s">
\
n
\
n
\
n
'
\
' <input type="hidden" name="vads_version" value="V2">
\
n
\
n
<input type="s'
\
' <input type="hidden" name="vads_version" value="V2">
\
n
\
n
<input type="s'
\
'ubmit" value="Click to pay">
\
n
</form>
\
n
</body>
\
n
</html>'
%
data_dict
'ubmit" value="Click to pay">
\
n
</form>
\
n
</body>
\
n
</html>'
%
data_dict
return
expected
def
stepCheckPaymentPage
(
self
,
sequence
):
expected
=
self
.
getExpectedUserPage
(
sequence
)
self
.
assertEqual
(
sequence
[
'payment_page'
],
expected
,
self
.
assertEqual
(
sequence
[
'payment_page'
],
expected
,
'
\
n
'
.
join
([
q
for
q
in
difflib
.
unified_diff
(
expected
.
split
(
'
\
n
'
),
'
\
n
'
.
join
([
q
for
q
in
difflib
.
unified_diff
(
expected
.
split
(
'
\
n
'
),
sequence
[
'payment_page'
].
split
(
'
\
n
'
))]))
sequence
[
'payment_page'
].
split
(
'
\
n
'
))]))
...
@@ -150,13 +155,29 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin):
...
@@ -150,13 +155,29 @@ class TestVifibPayZen(TestVifibSlapWebServiceMixin):
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
sequence_list
.
play
(
self
)
def
stepCheck
Planned
RegisteredPayment
(
self
,
sequence
):
def
stepCheckRegisteredPayment
(
self
,
sequence
):
self
.
assertEqual
(
sequence
[
'payment'
].
getSimulationState
(),
'started'
)
self
.
assertEqual
(
sequence
[
'payment'
].
getSimulationState
(),
'started'
)
self
.
assertEqual
(
self
.
portal
.
portal_catalog
.
countResults
(
event_list
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Payzen Event'
,
portal_type
=
'Payzen Event'
,
default_destination_uid
=
sequence
[
'payment'
].
getUid
(),
default_destination_uid
=
sequence
[
'payment'
].
getUid
(),
limit
=
3
)[
0
][
0
],
2
)
limit
=
2
)
raise
NotImplementedError
(
'Not finished checks.'
)
self
.
assertEqual
(
len
(
event_list
),
1
)
event
=
event_list
[
0
]
self
.
assertEqual
(
event
.
getTitle
(),
'User navigation script for %s'
%
sequence
[
'payment'
].
getTitle
())
message_list
=
event
.
contentValues
(
portal_type
=
'Payzen Event Message'
)
self
.
assertEqual
(
len
(
message_list
),
1
)
message
=
message_list
[
0
]
expected
=
self
.
getExpectedUserPage
(
sequence
)
self
.
assertEqual
(
message
.
getTextContent
(),
expected
,
'
\
n
'
.
join
([
q
for
q
in
difflib
.
unified_diff
(
expected
.
split
(
'
\
n
'
),
message
.
getTextContent
().
split
(
'
\
n
'
))]))
def
test_PaymentTransaction_updateStatus_planned_registered
(
self
):
def
test_PaymentTransaction_updateStatus_planned_registered
(
self
):
sequence_list
=
SequenceList
()
sequence_list
=
SequenceList
()
...
...
master/bt5/vifib_erp5/bt/revision
View file @
87dacc26
456
457
\ No newline at end of file
\ No newline at end of file
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