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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
8be2129c
Commit
8be2129c
authored
Oct 05, 2022
by
Kazuhiko Shiozaki
Committed by
Jérome Perrin
Apr 01, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: py2/py3: make erp5_core_test code compatible.
parent
10543794
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Catalog.py
...mplateItem/portal_components/test.erp5.testERP5Catalog.py
+2
-2
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Core.py
...tTemplateItem/portal_components/test.erp5.testERP5Core.py
+4
-4
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Type.py
...tTemplateItem/portal_components/test.erp5.testERP5Type.py
+2
-2
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testSelectionTool.py
...lateItem/portal_components/test.erp5.testSelectionTool.py
+1
-1
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Catalog.py
View file @
8be2129c
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
##############################################################################
##############################################################################
from
functools
import
partial
from
functools
import
partial
import
httplib
import
six.moves.http_client
from
random
import
randint
from
random
import
randint
import
sys
import
sys
import
threading
import
threading
...
@@ -4128,7 +4128,7 @@ VALUES
...
@@ -4128,7 +4128,7 @@ VALUES
ret
=
self
.
publish
(
ret
=
self
.
publish
(
self
.
portal
.
portal_catalog
.
getPath
(),
self
.
portal
.
portal_catalog
.
getPath
(),
basic
=
'ERP5TypeTestCase:'
)
basic
=
'ERP5TypeTestCase:'
)
self
.
assertEqual
(
httplib
.
OK
,
ret
.
getStatus
())
self
.
assertEqual
(
six
.
moves
.
http_client
.
OK
,
ret
.
getStatus
())
# check if we did not just publish the result of `str(portal_catalog.__call__())`,
# check if we did not just publish the result of `str(portal_catalog.__call__())`,
# but a proper page
# but a proper page
self
.
assertIn
(
'<title>Catalog Tool - portal_catalog'
,
ret
.
getBody
())
self
.
assertIn
(
'<title>Catalog Tool - portal_catalog'
,
ret
.
getBody
())
...
...
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Core.py
View file @
8be2129c
...
@@ -29,8 +29,8 @@
...
@@ -29,8 +29,8 @@
import
collections
import
collections
import
pprint
import
pprint
import
httplib
import
six.moves.http_client
import
url
parse
import
six.moves.urllib.
parse
import
base64
import
base64
import
urllib
import
urllib
import
lxml.html
import
lxml.html
...
@@ -636,9 +636,9 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
...
@@ -636,9 +636,9 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
self
.
commit
()
self
.
commit
()
self
.
tic
()
self
.
tic
()
_
,
api_netloc
,
_
,
_
,
_
=
url
parse
.
urlsplit
(
self
.
portal
.
absolute_url
())
_
,
api_netloc
,
_
,
_
,
_
=
six
.
moves
.
urllib
.
parse
.
urlsplit
(
self
.
portal
.
absolute_url
())
connection
=
httplib
.
HTTPConnection
(
api_netloc
)
connection
=
six
.
moves
.
http_client
.
HTTPConnection
(
api_netloc
)
connection
.
request
(
connection
.
request
(
method
=
'GET'
,
method
=
'GET'
,
url
=
'%s/Person_getPrimaryGroup'
%
\
url
=
'%s/Person_getPrimaryGroup'
%
\
...
...
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Type.py
View file @
8be2129c
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
try
:
try
:
from
ZODB._compat
import
cPickle
from
ZODB._compat
import
cPickle
except
ImportError
:
# BBB: ZODB < 4
except
ImportError
:
# BBB: ZODB < 4
import
cPickle
import
six.moves.
cPickle
import
unittest
import
unittest
import
sys
import
sys
import
mock
import
mock
...
@@ -330,7 +330,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
...
@@ -330,7 +330,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
portal
.
person_module
.
_setObject
(
o
.
getId
(),
aq_base
(
o
))
portal
.
person_module
.
_setObject
(
o
.
getId
(),
aq_base
(
o
))
try
:
try
:
self
.
commit
()
self
.
commit
()
except
cPickle
.
PicklingError
:
except
six
.
moves
.
cPickle
.
PicklingError
:
self
.
abort
()
self
.
abort
()
else
:
else
:
self
.
fail
(
"No exception raised when storing explicitly a temp object"
self
.
fail
(
"No exception raised when storing explicitly a temp object"
...
...
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testSelectionTool.py
View file @
8be2129c
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
import
contextlib
import
contextlib
import
unittest
import
unittest
from
threading
import
Thread
from
threading
import
Thread
from
thread
import
get_ident
from
six.moves._
thread
import
get_ident
from
unittest
import
skip
from
unittest
import
skip
import
transaction
import
transaction
...
...
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