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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
3b15e955
Commit
3b15e955
authored
Feb 26, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core_test: address pylint warnings from testERP5Base
parent
614ac5e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
17 deletions
+26
-17
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Base.py
...tTemplateItem/portal_components/test.erp5.testERP5Base.py
+1
-11
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Base.xml
...TemplateItem/portal_components/test.erp5.testERP5Base.xml
+25
-6
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Base.py
View file @
3b15e955
...
@@ -28,7 +28,6 @@
...
@@ -28,7 +28,6 @@
from
collections
import
defaultdict
from
collections
import
defaultdict
import
os
import
os
import
unittest
from
DateTime
import
DateTime
from
DateTime
import
DateTime
from
Products.ERP5Type.Utils
import
convertToUpperCase
from
Products.ERP5Type.Utils
import
convertToUpperCase
...
@@ -80,15 +79,6 @@ class TestERP5Base(ERP5TypeTestCase):
...
@@ -80,15 +79,6 @@ class TestERP5Base(ERP5TypeTestCase):
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
tests
.
__file__
),
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
tests
.
__file__
),
'test_data'
,
'images'
,
filename
))
'test_data'
,
'images'
,
filename
))
def
login
(
self
):
"""Create a new manager user and login.
"""
user_name
=
'kevin'
user_folder
=
self
.
getPortal
().
acl_users
user_folder
.
_doAddUser
(
user_name
,
''
,
[
'Manager'
,
'Owner'
,
'Assignor'
],
[])
user
=
user_folder
.
getUserById
(
user_name
).
__of__
(
user_folder
)
newSecurityManager
(
None
,
user
)
def
login_as_auditor
(
self
):
def
login_as_auditor
(
self
):
"""Create a new member user with Auditor role, and login
"""Create a new member user with Auditor role, and login
"""
"""
...
@@ -1823,7 +1813,7 @@ class Base_getDialogSectionCategoryItemListTest(ERP5TypeTestCase):
...
@@ -1823,7 +1813,7 @@ class Base_getDialogSectionCategoryItemListTest(ERP5TypeTestCase):
"""
"""
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
super
(
ERP5TypeTestCase
,
self
).
afterSetUp
()
super
(
Base_getDialogSectionCategoryItemListTest
,
self
).
afterSetUp
()
self
.
user_id
=
self
.
id
()
self
.
user_id
=
self
.
id
()
self
.
portal
.
acl_users
.
zodb_roles
.
doAssignRoleToPrincipal
(
self
.
user_id
,
'Auditor'
)
self
.
portal
.
acl_users
.
zodb_roles
.
doAssignRoleToPrincipal
(
self
.
user_id
,
'Auditor'
)
self
.
person
=
self
.
portal
.
person_module
.
newContent
(
self
.
person
=
self
.
portal
.
person_module
.
newContent
(
...
...
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Base.xml
View file @
3b15e955
...
@@ -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>
testERP5Base
</string>
</value>
<value>
<string>
testERP5Base
</string>
</value>
...
@@ -43,9 +49,7 @@
...
@@ -43,9 +49,7 @@
<item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<value>
<tuple>
<tuple/>
<string>
W: 82, 2: Arguments number differs from overridden \'login\' method (arguments-differ)
</string>
</tuple>
</value>
</value>
</item>
</item>
<item>
<item>
...
@@ -55,13 +59,28 @@
...
@@ -55,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>
...
@@ -74,7 +93,7 @@
...
@@ -74,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>
...
@@ -83,7 +102,7 @@
...
@@ -83,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