diff options
| author | Carlos de la Guardia <cguardia@yahoo.com> | 2011-06-06 12:03:46 -0500 |
|---|---|---|
| committer | Carlos de la Guardia <cguardia@yahoo.com> | 2011-06-06 12:03:46 -0500 |
| commit | a5713863a80a493a1485057609578b907d04c770 (patch) | |
| tree | e2230d20775d9fa80ea8dafa06910b65cb6859d5 /docs/tutorials/wiki/src/tests | |
| parent | ffca4ef5eba01234433bc4d6029dee719ab261d0 (diff) | |
| parent | 703e3677dc42518cb80626650aaf62e7db17812a (diff) | |
| download | pyramid-a5713863a80a493a1485057609578b907d04c770.tar.gz pyramid-a5713863a80a493a1485057609578b907d04c770.tar.bz2 pyramid-a5713863a80a493a1485057609578b907d04c770.zip | |
Merge branch 'master' of github.com:Pylons/pyramid
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): |
