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
Titouan Soulard
erp5
Commits
525bdbc5
Commit
525bdbc5
authored
Oct 05, 2022
by
Kazuhiko Shiozaki
Committed by
Jérome Perrin
Aug 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: py2/py3: make erp5_core_test code compatible.
parent
5a2f2669
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 @
525bdbc5
...
...
@@ -28,7 +28,7 @@
##############################################################################
from
functools
import
partial
import
httplib
import
six.moves.http_client
from
random
import
randint
import
sys
import
threading
...
...
@@ -4121,7 +4121,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 @
525bdbc5
...
...
@@ -28,8 +28,8 @@
##############################################################################
import
pprint
import
httplib
import
url
parse
import
six.moves.http_client
import
six.moves.urllib.
parse
import
base64
import
urllib
import
lxml.html
...
...
@@ -629,9 +629,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 @
525bdbc5
...
...
@@ -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 @
525bdbc5
...
...
@@ -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