Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zodburi
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
zodburi
Commits
c3612256
Commit
c3612256
authored
May 02, 2013
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suppress ResourceWarnings under Py3k.
parent
3f7bfa1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
zodburi/tests/test_resolvers.py
zodburi/tests/test_resolvers.py
+21
-9
No files found.
zodburi/tests/test_resolvers.py
View file @
c3612256
...
...
@@ -135,14 +135,17 @@ class TestFileStorageURIResolver(Base, unittest.TestCase):
def
test_invoke_factory_filestorage
(
self
):
import
os
from
ZODB.FileStorage
import
FileStorage
self
.
assertFalse
(
os
.
path
.
exists
(
os
.
path
.
join
(
self
.
tmpdir
,
'db.db'
)))
resolver
=
self
.
_makeOne
()
factory
,
dbkw
=
resolver
(
'file://%s/db.db?quota=200'
%
self
.
tmpdir
)
storage
=
factory
()
from
ZODB.FileStorage
import
FileStorage
self
.
assertTrue
(
isinstance
(
storage
,
FileStorage
))
self
.
assertEqual
(
storage
.
_quota
,
200
)
self
.
assertTrue
(
os
.
path
.
exists
(
os
.
path
.
join
(
self
.
tmpdir
,
'db.db'
)))
try
:
self
.
assertEqual
(
storage
.
_quota
,
200
)
self
.
assertTrue
(
os
.
path
.
exists
(
os
.
path
.
join
(
self
.
tmpdir
,
'db.db'
)))
finally
:
storage
.
close
()
def
test_invoke_factory_demostorage
(
self
):
import
os
...
...
@@ -154,8 +157,11 @@ class TestFileStorageURIResolver(Base, unittest.TestCase):
storage
=
factory
()
self
.
assertTrue
(
isinstance
(
storage
,
DemoStorage
))
self
.
assertTrue
(
isinstance
(
storage
.
base
,
FileStorage
))
self
.
assertEqual
(
dbkw
,
{})
self
.
assertTrue
(
os
.
path
.
exists
(
os
.
path
.
join
(
self
.
tmpdir
,
'db.db'
)))
try
:
self
.
assertEqual
(
dbkw
,
{})
self
.
assertTrue
(
os
.
path
.
exists
(
os
.
path
.
join
(
self
.
tmpdir
,
'db.db'
)))
finally
:
storage
.
close
()
def
test_invoke_factory_blobstorage
(
self
):
import
os
...
...
@@ -171,8 +177,11 @@ class TestFileStorageURIResolver(Base, unittest.TestCase):
'&blobstorage_layout=bushy'
%
(
self
.
tmpdir
,
q
(
self
.
tmpdir
)))
storage
=
factory
()
self
.
assertTrue
(
isinstance
(
storage
,
BlobStorage
))
self
.
assertTrue
(
os
.
path
.
exists
(
DB_FILE
))
self
.
assertTrue
(
os
.
path
.
exists
(
BLOB_DIR
))
try
:
self
.
assertTrue
(
os
.
path
.
exists
(
DB_FILE
))
self
.
assertTrue
(
os
.
path
.
exists
(
BLOB_DIR
))
finally
:
storage
.
close
()
def
test_invoke_factory_blobstorage_and_demostorage
(
self
):
import
os
...
...
@@ -188,8 +197,11 @@ class TestFileStorageURIResolver(Base, unittest.TestCase):
'&blobstorage_layout=bushy'
%
(
self
.
tmpdir
,
q
(
self
.
tmpdir
)))
storage
=
factory
()
self
.
assertTrue
(
isinstance
(
storage
,
DemoStorage
))
self
.
assertTrue
(
os
.
path
.
exists
(
DB_FILE
))
self
.
assertTrue
(
os
.
path
.
exists
(
BLOB_DIR
))
try
:
self
.
assertTrue
(
os
.
path
.
exists
(
DB_FILE
))
self
.
assertTrue
(
os
.
path
.
exists
(
BLOB_DIR
))
finally
:
storage
.
close
()
def
test_dbargs
(
self
):
resolver
=
self
.
_makeOne
()
...
...
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