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
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
Thomas Gambier
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
Changes
2
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):
...
@@ -80,6 +80,13 @@ class TestERP5Credential(ERP5TypeTestCase):
system_preference
=
self
.
portal
.
portal_preferences
.
newContent
(
system_preference
=
self
.
portal
.
portal_preferences
.
newContent
(
portal_type
=
'System Preference'
)
portal_type
=
'System Preference'
)
system_preference
.
enable
()
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
@
reindex
def
enableAlarm
(
self
):
def
enableAlarm
(
self
):
...
@@ -140,14 +147,6 @@ class TestERP5Credential(ERP5TypeTestCase):
...
@@ -140,14 +147,6 @@ class TestERP5Credential(ERP5TypeTestCase):
def
beforeTearDown
(
self
):
def
beforeTearDown
(
self
):
self
.
login
()
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
.
resetCredentialSystemPreference
()
self
.
tic
()
self
.
tic
()
self
.
logout
()
self
.
logout
()
...
@@ -779,12 +778,15 @@ class TestERP5Credential(ERP5TypeTestCase):
...
@@ -779,12 +778,15 @@ class TestERP5Credential(ERP5TypeTestCase):
for
line
in
body_message
.
splitlines
():
for
line
in
body_message
.
splitlines
():
match_obj
=
re
.
search
(
rawstr
,
line
)
match_obj
=
re
.
search
(
rawstr
,
line
)
if
match_obj
is
not
None
:
if
match_obj
is
not
None
:
url
=
line
[
line
.
find
(
'http
:
'
):]
url
=
line
[
line
.
find
(
'http'
):]
url
=
url
.
strip
()
url
=
url
.
strip
()
self
.
assertNotEquals
(
url
,
None
)
self
.
assertNotEquals
(
url
,
None
)
self
.
publish
(
url
)
self
.
publish
(
url
)
parameters
=
cgi
.
parse_qs
(
urlparse
.
urlparse
(
url
)[
4
])
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
]
key
=
parameters
[
'reset_key'
][
0
]
# before changing, check that the user exists with 'secret' password
# before changing, check that the user exists with 'secret' password
self
.
_assertUserExists
(
'barney-login'
,
'secret'
)
self
.
_assertUserExists
(
'barney-login'
,
'secret'
)
...
...
bt5/erp5_credential/TestTemplateItem/portal_components/test.erp5.testERP5Credential.xml
View file @
011ea48e
...
@@ -6,6 +6,12 @@
...
@@ -6,6 +6,12 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testERP5Credential
</string>
</value>
<value>
<string>
testERP5Credential
</string>
</value>
...
@@ -53,13 +59,28 @@
...
@@ -53,13 +59,28 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<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>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -72,7 +93,7 @@
...
@@ -72,7 +93,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -81,7 +102,7 @@
...
@@ -81,7 +102,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
</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