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
139
Merge Requests
139
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
52f21b9b
Commit
52f21b9b
authored
Nov 04, 2016
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! test: migrate to ERP5 Login authentication.
parent
26e20e2d
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
112 additions
and
48 deletions
+112
-48
bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_createAnotherFunctionalTestUser.py
...tutorial_ui_test/Zuite_createAnotherFunctionalTestUser.py
+7
-1
bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_createFunctionalTestUser.py
...5_user_tutorial_ui_test/Zuite_createFunctionalTestUser.py
+7
-1
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/ERP5Site_createPersonToAskAccountRecover.py
...derjs_ui_test/ERP5Site_createPersonToAskAccountRecover.py
+6
-1
bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.py
...tal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.py
+8
-1
bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.ShaSecurityMixin.py
...plateItem/portal_components/test.erp5.ShaSecurityMixin.py
+7
-2
product/ERP5/tests/testPasswordTool.py
product/ERP5/tests/testPasswordTool.py
+71
-41
product/ERP5OOo/tests/testDeferredStyle.py
product/ERP5OOo/tests/testDeferredStyle.py
+6
-1
No files found.
bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_createAnotherFunctionalTestUser.py
View file @
52f21b9b
...
@@ -12,7 +12,6 @@ if person is None:
...
@@ -12,7 +12,6 @@ if person is None:
title
=
functional_test_username
)
title
=
functional_test_username
)
person
.
edit
(
reference
=
functional_test_username
,
person
.
edit
(
reference
=
functional_test_username
,
password
=
howto_dict
[
'functional_test_user_password'
],
default_email_text
=
howto_dict
[
'functional_test_user_email'
])
default_email_text
=
howto_dict
[
'functional_test_user_email'
])
person
.
validate
()
person
.
validate
()
...
@@ -23,6 +22,13 @@ if person is None:
...
@@ -23,6 +22,13 @@ if person is None:
function
=
'company/manager'
)
function
=
'company/manager'
)
assignment
.
open
()
assignment
.
open
()
login
=
person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
functional_test_username
,
password
=
howto_dict
[
'functional_test_user_password'
],
)
login
.
validate
()
# XXX (lucas): These tests must be able to run on an instance without security.
# XXX (lucas): These tests must be able to run on an instance without security.
for
role
in
(
'Assignee'
,
'Assignor'
,
'Associate'
,
'Auditor'
,
'Owner'
):
for
role
in
(
'Assignee'
,
'Assignor'
,
'Associate'
,
'Auditor'
,
'Owner'
):
portal
.
acl_users
.
zodb_roles
.
assignRoleToPrincipal
(
role
,
functional_test_username
)
portal
.
acl_users
.
zodb_roles
.
assignRoleToPrincipal
(
role
,
functional_test_username
)
...
...
bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_createFunctionalTestUser.py
View file @
52f21b9b
...
@@ -12,7 +12,6 @@ if person is None:
...
@@ -12,7 +12,6 @@ if person is None:
title
=
functional_test_username
)
title
=
functional_test_username
)
person
.
edit
(
reference
=
functional_test_username
,
person
.
edit
(
reference
=
functional_test_username
,
password
=
howto_dict
[
'functional_test_user_password'
],
default_email_text
=
howto_dict
[
'functional_test_user_email'
])
default_email_text
=
howto_dict
[
'functional_test_user_email'
])
person
.
validate
()
person
.
validate
()
...
@@ -23,6 +22,13 @@ if person is None:
...
@@ -23,6 +22,13 @@ if person is None:
function
=
'company/manager'
)
function
=
'company/manager'
)
assignment
.
open
()
assignment
.
open
()
login
=
person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
functional_test_username
,
password
=
howto_dict
[
'functional_test_user_password'
],
)
login
.
validate
()
# XXX (lucas): These tests must be able to run on an instance without security.
# XXX (lucas): These tests must be able to run on an instance without security.
for
role
in
(
'Assignee'
,
'Assignor'
,
'Associate'
,
'Auditor'
,
'Owner'
):
for
role
in
(
'Assignee'
,
'Assignor'
,
'Associate'
,
'Auditor'
,
'Owner'
):
portal
.
acl_users
.
zodb_roles
.
assignRoleToPrincipal
(
role
,
functional_test_username
)
portal
.
acl_users
.
zodb_roles
.
assignRoleToPrincipal
(
role
,
functional_test_username
)
...
...
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/ERP5Site_createPersonToAskAccountRecover.py
View file @
52f21b9b
...
@@ -11,10 +11,15 @@ else:
...
@@ -11,10 +11,15 @@ else:
person
=
person_module
.
newContent
(
portal_type
=
"Person"
,
person
=
person_module
.
newContent
(
portal_type
=
"Person"
,
reference
=
user_id
,
reference
=
user_id
,
id
=
user_id
,
id
=
user_id
,
password
=
new_password
,
default_email_text
=
"userA@example.invalid"
)
default_email_text
=
"userA@example.invalid"
)
assignment
=
person
.
newContent
(
portal_type
=
'Assignment'
)
assignment
=
person
.
newContent
(
portal_type
=
'Assignment'
)
assignment
.
open
()
assignment
.
open
()
login
=
person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
user_id
,
password
=
new_password
,
)
login
.
validate
()
# Make sure always a new password
# Make sure always a new password
person
.
setPassword
(
new_password
)
person
.
setPassword
(
new_password
)
...
...
bt5/erp5_web_ui_test/SkinTemplateItem/portal_skins/erp5_web_ui_test/WebSiteModule_resetWebZuite.py
View file @
52f21b9b
...
@@ -27,7 +27,7 @@ if not portal.person_module.has_key('test_webmaster'):
...
@@ -27,7 +27,7 @@ if not portal.person_module.has_key('test_webmaster'):
else
:
else
:
person
=
portal
.
person_module
.
test_webmaster
person
=
portal
.
person_module
.
test_webmaster
person
.
edit
(
first_name
=
'Test'
,
last_name
=
'Webmaster'
,
person
.
edit
(
first_name
=
'Test'
,
last_name
=
'Webmaster'
,
reference
=
'test_webmaster'
,
password
=
'test_webmaster'
)
reference
=
'test_webmaster'
)
person
.
setRole
(
'internal'
)
person
.
setRole
(
'internal'
)
if
not
len
(
person
.
objectValues
(
portal_type
=
'Assignment'
)):
if
not
len
(
person
.
objectValues
(
portal_type
=
'Assignment'
)):
assignment
=
person
.
newContent
(
portal_type
=
'Assignment'
)
assignment
=
person
.
newContent
(
portal_type
=
'Assignment'
)
...
@@ -36,6 +36,13 @@ if not len(person.objectValues(portal_type='Assignment')):
...
@@ -36,6 +36,13 @@ if not len(person.objectValues(portal_type='Assignment')):
stop_date
=
DateTime
(
'2990/12/31'
))
stop_date
=
DateTime
(
'2990/12/31'
))
if
assignment
.
getValidationState
()
!=
'open'
:
if
assignment
.
getValidationState
()
!=
'open'
:
assignment
.
open
()
assignment
.
open
()
if
not
len
(
person
.
objectValues
(
portal_type
=
'ERP5 Login'
)):
login
=
person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
'test_webmaster'
,
password
=
'test_webmaster'
,
)
login
.
validate
()
if
person
.
getValidationState
()
!=
'validated'
:
if
person
.
getValidationState
()
!=
'validated'
:
person
.
validate
()
person
.
validate
()
...
...
bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.ShaSecurityMixin.py
View file @
52f21b9b
...
@@ -55,8 +55,13 @@ class ShaSecurityMixin(object):
...
@@ -55,8 +55,13 @@ class ShaSecurityMixin(object):
if
person
is
None
:
if
person
is
None
:
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
)
person
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
)
person
.
edit
(
first_name
=
reference
,
person
.
edit
(
first_name
=
reference
,
reference
=
reference
,
reference
=
reference
)
password
=
password
)
login
=
person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
reference
,
password
=
password
,
)
login
.
validate
()
self
.
tic
()
self
.
tic
()
create
=
True
create
=
True
...
...
product/ERP5/tests/testPasswordTool.py
View file @
52f21b9b
This diff is collapsed.
Click to expand it.
product/ERP5OOo/tests/testDeferredStyle.py
View file @
52f21b9b
...
@@ -64,10 +64,15 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -64,10 +64,15 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
person
=
person_module
.
newContent
(
id
=
'pers'
,
portal_type
=
'Person'
,
person
=
person_module
.
newContent
(
id
=
'pers'
,
portal_type
=
'Person'
,
reference
=
self
.
username
,
reference
=
self
.
username
,
first_name
=
self
.
first_name
,
first_name
=
self
.
first_name
,
password
=
self
.
password
,
default_email_text
=
self
.
recipient_email_address
)
default_email_text
=
self
.
recipient_email_address
)
assignment
=
person
.
newContent
(
portal_type
=
'Assignment'
)
assignment
=
person
.
newContent
(
portal_type
=
'Assignment'
)
assignment
.
open
()
assignment
.
open
()
login
=
person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
self
.
username
,
password
=
self
.
password
,
)
login
.
validate
()
self
.
tic
()
self
.
tic
()
def
loginAsUser
(
self
,
username
):
def
loginAsUser
(
self
,
username
):
...
...
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