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
Hardik Juneja
slapos.core
Commits
959edf00
Commit
959edf00
authored
Dec 11, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check that user can be redirected to payzen.
parent
edfaddfe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
1 deletion
+48
-1
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
...os_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
+47
-0
master/bt5/slapos_erp5/bt/revision
master/bt5/slapos_erp5/bt/revision
+1
-1
No files found.
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
View file @
959edf00
...
@@ -11,6 +11,7 @@ import xml_marshaller
...
@@ -11,6 +11,7 @@ import xml_marshaller
from
AccessControl.SecurityManagement
import
getSecurityManager
,
\
from
AccessControl.SecurityManagement
import
getSecurityManager
,
\
setSecurityManager
setSecurityManager
from
DateTime
import
DateTime
from
DateTime
import
DateTime
import
json
def
changeSkin
(
skin_name
):
def
changeSkin
(
skin_name
):
def
decorator
(
func
):
def
decorator
(
func
):
...
@@ -473,6 +474,45 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
...
@@ -473,6 +474,45 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
[
q
.
getAggregate
()
for
q
in
line_list
]
[
q
.
getAggregate
()
for
q
in
line_list
]
)
)
@
changeSkin
(
'Hosting'
)
def
usePayzenManually
(
self
,
web_site
):
acknowledgement_json
=
\
web_site
.
AcknowledgementTool_getUserUnreadAcknowledgementJSON
()
acknowledgement_dict
=
json
.
loads
(
acknowledgement_json
)
self
.
assertTrue
(
'result'
in
acknowledgement_dict
,
"%s"
%
acknowledgement_dict
)
message_list
=
acknowledgement_dict
[
'result'
]
self
.
assertEquals
(
len
(
message_list
),
1
,
"%s"
%
message_list
)
message
=
message_list
[
0
]
self
.
assertTrue
(
'acknowledge_url'
in
message
,
"%s"
%
message
)
self
.
assertTrue
(
'text_content'
in
message
,
"%s"
%
message
)
acknowledge_url
=
message
[
'acknowledge_url'
]
text_content
=
message
[
'text_content'
]
self
.
assertTrue
(
acknowledge_url
.
startswith
(
'AcknowledgementTool_acknowledge?acknowledgement_url=event_module/'
),
"%s"
%
acknowledge_url
)
self
.
assertTrue
(
text_content
.
startswith
(
'Please pay your payment by clicking <a href="accounting_module/'
),
"%s"
%
text_content
)
self
.
assertTrue
(
text_content
.
endswith
(
'/PaymentTransaction_redirectToManualPayzenPayment">here</a>.'
),
"%s"
%
text_content
)
# Pay to payzen
to_click_url
=
re
.
search
(
'href="(.+?)"'
,
text_content
).
group
(
1
)
module
,
document_id
,
skin
=
to_click_url
.
split
(
'/'
)
click_result
=
\
web_site
.
accounting_module
[
document_id
].
\
PaymentTransaction_redirectToManualPayzenPayment
()
# Acknowledge
event_url
=
str
(
acknowledge_url
.
split
(
'='
)[
-
1
])
web_site
.
AcknowledgementTool_acknowledge
(
acknowledgement_url
=
event_url
)
def
test
(
self
):
def
test
(
self
):
# some preparation
# some preparation
...
@@ -679,3 +719,10 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
...
@@ -679,3 +719,10 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
person
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Person'
,
person
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Person'
,
reference
=
person_reference
)
reference
=
person_reference
)
self
.
assertPersonDocumentCoverage
(
person
)
self
.
assertPersonDocumentCoverage
(
person
)
self
.
login
(
public_reference
)
self
.
usePayzenManually
(
self
.
web_site
)
self
.
login
(
friend_reference
)
self
.
usePayzenManually
(
self
.
web_site
)
master/bt5/slapos_erp5/bt/revision
View file @
959edf00
142
143
\ 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