Skip to content
Browse files

Fixed failing tests in test/session.py when postgres is not installed…

…. (tx Michael Diamond)
  • Loading branch information...
1 parent 615d09c commit 069827cdcc2ad345be2e37d619118de41b34aa66 @anandology committed
Showing with 5 additions and 5 deletions.
  1. +5 −5 test/session.py
View
10 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()

0 comments on commit 069827c

Please sign in to comment.
Something went wrong with that request. Please try again.