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
143
Merge Requests
143
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
45ef2b46
Commit
45ef2b46
authored
Oct 05, 2022
by
Kazuhiko Shiozaki
Committed by
Jérome Perrin
May 08, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: py2/py3: make erp5_core_test code compatible.
parent
e29b0b9a
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 @
45ef2b46
...
...
@@ -28,7 +28,7 @@
##############################################################################
from
functools
import
partial
import
httplib
import
six.moves.http_client
from
random
import
randint
import
sys
import
threading
...
...
@@ -4128,7 +4128,7 @@ VALUES
ret
=
self
.
publish
(
self
.
portal
.
portal_catalog
.
getPath
(),
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__())`,
# but a proper page
self
.
assertIn
(
'<title>Catalog Tool - portal_catalog'
,
ret
.
getBody
())
...
...
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Core.py
View file @
45ef2b46
...
...
@@ -29,8 +29,8 @@
import
collections
import
pprint
import
httplib
import
url
parse
import
six.moves.http_client
import
six.moves.urllib.
parse
import
base64
import
urllib
import
lxml.html
...
...
@@ -636,9 +636,9 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional):
self
.
commit
()
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
(
method
=
'GET'
,
url
=
'%s/Person_getPrimaryGroup'
%
\
...
...
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Type.py
View file @
45ef2b46
...
...
@@ -29,7 +29,7 @@
try
:
from
ZODB._compat
import
cPickle
except
ImportError
:
# BBB: ZODB < 4
import
cPickle
import
six.moves.
cPickle
import
unittest
import
sys
import
mock
...
...
@@ -330,7 +330,7 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
portal
.
person_module
.
_setObject
(
o
.
getId
(),
aq_base
(
o
))
try
:
self
.
commit
()
except
cPickle
.
PicklingError
:
except
six
.
moves
.
cPickle
.
PicklingError
:
self
.
abort
()
else
:
self
.
fail
(
"No exception raised when storing explicitly a temp object"
...
...
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testSelectionTool.py
View file @
45ef2b46
...
...
@@ -29,7 +29,7 @@
import
contextlib
import
unittest
from
threading
import
Thread
from
thread
import
get_ident
from
six.moves._
thread
import
get_ident
from
unittest
import
skip
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