diff options
| author | Chris McDonough <chrism@plope.com> | 2011-06-06 00:19:21 -0700 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-06-06 00:19:21 -0700 |
| commit | 703e3677dc42518cb80626650aaf62e7db17812a (patch) | |
| tree | 4b9cfefae6d541e633254cfea44925cb40f71b80 /docs/tutorials/wiki/src/tests | |
| parent | aee35e30083acd3d3c84e7f50db1f17bf6dc2d12 (diff) | |
| parent | e3d556f25d8fae0b19a0f30a87e4ff12af812d63 (diff) | |
| download | pyramid-703e3677dc42518cb80626650aaf62e7db17812a.tar.gz pyramid-703e3677dc42518cb80626650aaf62e7db17812a.tar.bz2 pyramid-703e3677dc42518cb80626650aaf62e7db17812a.zip | |
Merge pull request #205 from ppaez/master
Fix "[Error 32] file being used by another process" in ZODB tutorial functional tests
Diffstat (limited to 'docs/tutorials/wiki/src/tests')
| -rw-r--r-- | docs/tutorials/wiki/src/tests/tutorial/tests.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/tutorials/wiki/src/tests/tutorial/tests.py b/docs/tutorials/wiki/src/tests/tutorial/tests.py index d9ff866f1..0ce5ea718 100644 --- a/docs/tutorials/wiki/src/tests/tutorial/tests.py +++ b/docs/tutorials/wiki/src/tests/tutorial/tests.py @@ -139,16 +139,20 @@ class FunctionalTests(unittest.TestCase): self.tmpdir = tempfile.mkdtemp() dbpath = os.path.join( self.tmpdir, 'test.db') - settings = { 'zodb_uri' : 'file://' + dbpath } + from repoze.zodbconn.uri import db_from_uri + db = db_from_uri('file://' + dbpath) + settings = { 'zodb_uri' : None } app = main({}, **settings) - from repoze.zodbconn.middleware import EnvironmentDeleterMiddleware - app = EnvironmentDeleterMiddleware(app) + from repoze.zodbconn.connector import Connector + app = Connector(app, db) + self.db = db from webtest import TestApp self.testapp = TestApp(app) def tearDown(self): import shutil + self.db.close() shutil.rmtree( self.tmpdir ) def test_root(self): |
