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
Léo-Paul Géneau
erp5
Commits
8ab25eaf
Commit
8ab25eaf
authored
Feb 20, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: remove unused createZServer
parent
2124e9a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
25 deletions
+1
-25
product/ERP5Type/tests/ProcessingNodeTestCase.py
product/ERP5Type/tests/ProcessingNodeTestCase.py
+1
-1
product/ERP5Type/tests/utils.py
product/ERP5Type/tests/utils.py
+0
-24
No files found.
product/ERP5Type/tests/ProcessingNodeTestCase.py
View file @
8ab25eaf
...
...
@@ -17,7 +17,7 @@ from zLOG import LOG, ERROR
from
Products.CMFActivity.Activity.Queue
import
VALIDATION_ERROR_DELAY
from
ExtensionClass
import
pmc_init_of
from
Products.ERP5Type.tests.utils
import
\
addUserToDeveloperRole
,
createZServer
,
DummyMailHostMixin
,
parseListeningAddress
addUserToDeveloperRole
,
DummyMailHostMixin
,
parseListeningAddress
from
Products.CMFActivity.ActivityTool
import
getCurrentNode
...
...
product/ERP5Type/tests/utils.py
View file @
8ab25eaf
...
...
@@ -384,30 +384,6 @@ def parseListeningAddress(host_port=None, default_host='127.0.0.1'):
raise
RuntimeError
(
"Can't find free port (tried ports %u to %u)
\
n
"
%
(
55000
,
54999
+
m
))
def
createZServer
(
log
=
os
.
devnull
,
zserver_type
=
'http'
):
import
ZServer
if
zserver_type
==
'http'
:
zserver_class
,
zhandler_class
=
ZServer
.
zhttp_server
,
ZServer
.
zhttp_handler
elif
zserver_type
==
'webdav'
:
from
ZServer.HTTPServer
import
zwebdav_server
as
zserver_class
from
ZServer.WebDAVSrcHandler
import
WebDAVSrcHandler
as
zhandler_class
else
:
raise
NotImplementedError
lg
=
ZServer
.
logger
.
file_logger
(
log
)
class
new_zserver
(
zserver_class
):
# I can't use __new__ because zhttp_handler is an old-style class :(
def
__init__
(
self
):
self
.
__class__
,
=
self
.
__class__
.
__bases__
for
ip
,
port
in
parseListeningAddress
(
os
.
environ
.
get
(
'zserver'
)):
hs
=
new_zserver
()
try
:
hs
.
__init__
(
ip
,
port
,
resolver
=
None
,
logger_object
=
lg
)
hs
.
install_handler
(
zhandler_class
(
module
=
'Zope2'
,
uri_base
=
''
))
return
hs
except
socket
.
error
as
e
:
if
e
[
0
]
!=
errno
.
EADDRINUSE
:
raise
hs
.
close
()
class
DbFactory
(
ZopeDatabase
):
...
...
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