From 069827cdcc2ad345be2e37d619118de41b34aa66 Mon Sep 17 00:00:00 2001 From: Anand Chitipothu Date: Thu, 2 Aug 2012 22:47:46 +0530 Subject: [PATCH] Fixed failing tests in test/session.py when postgres is not installed. (tx Michael Diamond) --- test/session.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/session.py b/test/session.py index 00bb64f9..8e0e92bd 100644 --- a/test/session.py +++ b/test/session.py @@ -70,21 +70,21 @@ def testRedirect(self): class DBSessionTest(SessionTest): """Session test with db store.""" def make_session(self, app): - db = webtest.setup_database("postgres") + db = webtest.setup_database("sqlite", "sqlite3") #db.printing = True db.query("" + "CREATE TABLE session (" + " session_id char(128) unique not null," - + " atime timestamp default (current_timestamp at time zone 'utc')," + + " atime timestamp default (datetime('now','utc'))," + " data text)" ) store = web.session.DBStore(db, 'session') return web.session.Session(app, store, {'count': 0}) - + def tearDown(self): # there might be some error with the current connection, delete from a new connection - self.db = webtest.setup_database("postgres") + self.db = webtest.setup_database("sqlite","sqlite3") self.db.query('DROP TABLE session') - + if __name__ == "__main__": webtest.main()