Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
29b33f58
Commit
29b33f58
authored
Mar 06, 2013
by
Albertas Agejevas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZConfig wants strings.
parent
d8bc34cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
src/ZEO/_compat.py
src/ZEO/_compat.py
+5
-0
src/ZEO/tests/testConfig.py
src/ZEO/tests/testConfig.py
+5
-5
No files found.
src/ZEO/_compat.py
View file @
29b33f58
...
@@ -32,3 +32,8 @@ else:
...
@@ -32,3 +32,8 @@ else:
import
thread
import
thread
from
thread
import
get_ident
from
thread
import
get_ident
try
:
from
cStringIO
import
StringIO
except
:
from
io
import
StringIO
src/ZEO/tests/testConfig.py
View file @
29b33f58
...
@@ -32,8 +32,8 @@ class ZEOConfigTest(ConfigTestBase):
...
@@ -32,8 +32,8 @@ class ZEOConfigTest(ConfigTestBase):
from
ZEO.ClientStorage
import
ClientDisconnected
from
ZEO.ClientStorage
import
ClientDisconnected
import
ZConfig
import
ZConfig
from
ZODB.config
import
getDbSchema
from
ZODB.config
import
getDbSchema
from
ZEO._compat
import
Bytes
IO
from
ZEO._compat
import
String
IO
cfg
=
b
"""
cfg
=
"""
<zodb>
<zodb>
<zeoclient>
<zeoclient>
server localhost:56897
server localhost:56897
...
@@ -41,12 +41,12 @@ class ZEOConfigTest(ConfigTestBase):
...
@@ -41,12 +41,12 @@ class ZEOConfigTest(ConfigTestBase):
</zeoclient>
</zeoclient>
</zodb>
</zodb>
"""
"""
config
,
handle
=
ZConfig
.
loadConfigFile
(
getDbSchema
(),
Bytes
IO
(
cfg
))
config
,
handle
=
ZConfig
.
loadConfigFile
(
getDbSchema
(),
String
IO
(
cfg
))
self
.
assertEqual
(
config
.
database
[
0
].
config
.
storage
.
config
.
blob_dir
,
self
.
assertEqual
(
config
.
database
[
0
].
config
.
storage
.
config
.
blob_dir
,
None
)
None
)
self
.
assertRaises
(
ClientDisconnected
,
self
.
_test
,
cfg
)
self
.
assertRaises
(
ClientDisconnected
,
self
.
_test
,
cfg
)
cfg
=
b
"""
cfg
=
"""
<zodb>
<zodb>
<zeoclient>
<zeoclient>
blob-dir blobs
blob-dir blobs
...
@@ -55,7 +55,7 @@ class ZEOConfigTest(ConfigTestBase):
...
@@ -55,7 +55,7 @@ class ZEOConfigTest(ConfigTestBase):
</zeoclient>
</zeoclient>
</zodb>
</zodb>
"""
"""
config
,
handle
=
ZConfig
.
loadConfigFile
(
getDbSchema
(),
Bytes
IO
(
cfg
))
config
,
handle
=
ZConfig
.
loadConfigFile
(
getDbSchema
(),
String
IO
(
cfg
))
self
.
assertEqual
(
config
.
database
[
0
].
config
.
storage
.
config
.
blob_dir
,
self
.
assertEqual
(
config
.
database
[
0
].
config
.
storage
.
config
.
blob_dir
,
'blobs'
)
'blobs'
)
self
.
assertRaises
(
ClientDisconnected
,
self
.
_test
,
cfg
)
self
.
assertRaises
(
ClientDisconnected
,
self
.
_test
,
cfg
)
...
...
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