Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
508ace53
Commit
508ace53
authored
Mar 30, 2005
by
Stefan H. Holek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sync changes from CVS. Moved some imports to top of file.
parent
7ec49c4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
lib/python/Testing/ZopeTestCase/utils.py
lib/python/Testing/ZopeTestCase/utils.py
+6
-6
No files found.
lib/python/Testing/ZopeTestCase/utils.py
View file @
508ace53
...
...
@@ -18,8 +18,13 @@ module level to add functionality to the test environment.
$Id: utils.py,v 1.21 2005/02/11 09:00:21 shh42 Exp $
"""
import
os
import
sys
import
time
import
random
import
transaction
def
setupCoreSessions
(
app
=
None
):
'''Sets up the session_data_manager e.a.'''
from
Acquisition
import
aq_base
...
...
@@ -30,7 +35,7 @@ def setupCoreSessions(app=None):
if
not
hasattr
(
app
,
'temp_folder'
):
from
Products.TemporaryFolder.TemporaryFolder
import
MountedTemporaryFolder
tf
=
MountedTemporaryFolder
(
'temp_folder'
,
'Temporary Folder'
)
tf
=
MountedTemporaryFolder
(
'temp_folder'
,
'Temporary Folder'
)
app
.
_setObject
(
'temp_folder'
,
tf
)
commit
=
1
...
...
@@ -90,8 +95,6 @@ def setupSiteErrorLog(app=None):
transaction
.
commit
()
import
os
,
time
def
importObjectFromFile
(
container
,
filename
,
quiet
=
0
):
'''Imports an object from a (.zexp) file into the given container.'''
from
ZopeLite
import
_print
...
...
@@ -109,7 +112,6 @@ def startZServer(number_of_threads=1, log=None):
'''Starts an HTTP ZServer thread.'''
global
_Z2HOST
,
_Z2PORT
if
_Z2HOST
is
None
:
import
random
_Z2HOST
=
'127.0.0.1'
_Z2PORT
=
random
.
choice
(
range
(
55000
,
55500
))
from
ZServer
import
setNumberOfThreads
...
...
@@ -122,8 +124,6 @@ def startZServer(number_of_threads=1, log=None):
return
_Z2HOST
,
_Z2PORT
import
sys
def
makerequest
(
app
,
stdout
=
sys
.
stdout
):
'''Wraps the app into a fresh REQUEST.'''
from
ZPublisher.BaseRequest
import
RequestContainer
...
...
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