Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
140
Merge Requests
140
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
011ea48e
Commit
011ea48e
authored
Dec 31, 2020
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_credential: move some test code to ease running tests in live
parent
b102dd52
Pipeline
#13644
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
13 deletions
+36
-13
bt5/erp5_credential/TestTemplateItem/portal_components/test.erp5.testERP5Credential.py
...ateItem/portal_components/test.erp5.testERP5Credential.py
+12
-10
bt5/erp5_credential/TestTemplateItem/portal_components/test.erp5.testERP5Credential.xml
...teItem/portal_components/test.erp5.testERP5Credential.xml
+24
-3
No files found.
bt5/erp5_credential/TestTemplateItem/portal_components/test.erp5.testERP5Credential.py
View file @
011ea48e
...
...
@@ -80,6 +80,13 @@ class TestERP5Credential(ERP5TypeTestCase):
system_preference
=
self
.
portal
.
portal_preferences
.
newContent
(
portal_type
=
'System Preference'
)
system_preference
.
enable
()
# clear modules if necessary
module_list
=
(
self
.
portal
.
getDefaultModule
(
'Credential Request'
),
self
.
portal
.
getDefaultModule
(
'Credential Update'
),
self
.
portal
.
getDefaultModule
(
'Credential Recovery'
),
self
.
portal
.
getDefaultModule
(
'Person'
))
for
module
in
module_list
:
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
@
reindex
def
enableAlarm
(
self
):
...
...
@@ -140,14 +147,6 @@ class TestERP5Credential(ERP5TypeTestCase):
def
beforeTearDown
(
self
):
self
.
login
()
self
.
abort
()
# clear modules if necessary
module_list
=
(
self
.
portal
.
getDefaultModule
(
'Credential Request'
),
self
.
portal
.
getDefaultModule
(
'Credential Update'
),
self
.
portal
.
getDefaultModule
(
'Credential Recovery'
),
self
.
portal
.
getDefaultModule
(
'Person'
))
for
module
in
module_list
:
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
self
.
resetCredentialSystemPreference
()
self
.
tic
()
self
.
logout
()
...
...
@@ -779,12 +778,15 @@ class TestERP5Credential(ERP5TypeTestCase):
for
line
in
body_message
.
splitlines
():
match_obj
=
re
.
search
(
rawstr
,
line
)
if
match_obj
is
not
None
:
url
=
line
[
line
.
find
(
'http
:
'
):]
url
=
line
[
line
.
find
(
'http'
):]
url
=
url
.
strip
()
self
.
assertNotEquals
(
url
,
None
)
self
.
publish
(
url
)
parameters
=
cgi
.
parse_qs
(
urlparse
.
urlparse
(
url
)[
4
])
self
.
assertTrue
(
'reset_key'
in
parameters
)
self
.
assertTrue
(
'reset_key'
in
parameters
,
'reset_key not found in mail message : %s'
%
body_message
)
key
=
parameters
[
'reset_key'
][
0
]
# before changing, check that the user exists with 'secret' password
self
.
_assertUserExists
(
'barney-login'
,
'secret'
)
...
...
bt5/erp5_credential/TestTemplateItem/portal_components/test.erp5.testERP5Credential.xml
View file @
011ea48e
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testERP5Credential
</string>
</value>
...
...
@@ -53,13 +59,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -72,7 +93,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -81,7 +102,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
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