Skip to content

Commit

Permalink
Fixed failing tests in test/session.py when postgres is not installed…
Browse files Browse the repository at this point in the history
…. (tx Michael Diamond)
  • Loading branch information
anandology committed Aug 2, 2012
1 parent 615d09c commit 069827c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/session.py
Expand Up @@ -70,21 +70,21 @@ def testRedirect(self):
class DBSessionTest(SessionTest): class DBSessionTest(SessionTest):
"""Session test with db store.""" """Session test with db store."""
def make_session(self, app): def make_session(self, app):
db = webtest.setup_database("postgres") db = webtest.setup_database("sqlite", "sqlite3")
#db.printing = True #db.printing = True
db.query("" db.query(""
+ "CREATE TABLE session (" + "CREATE TABLE session ("
+ " session_id char(128) unique not null," + " session_id char(128) unique not null,"
+ " atime timestamp default (current_timestamp at time zone 'utc')," + " atime timestamp default (datetime('now','utc')),"
+ " data text)" + " data text)"
) )
store = web.session.DBStore(db, 'session') store = web.session.DBStore(db, 'session')
return web.session.Session(app, store, {'count': 0}) return web.session.Session(app, store, {'count': 0})

def tearDown(self): def tearDown(self):
# there might be some error with the current connection, delete from a new connection # 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') self.db.query('DROP TABLE session')

if __name__ == "__main__": if __name__ == "__main__":
webtest.main() webtest.main()

0 comments on commit 069827c

Please sign in to comment.