>
> I don't think this is an issue. session test requires postgres.
>
> Trying changing
> db = webtest.setup_database("postgres")
> with
> db = webtest.setup_database("sqlite")
> to make the tests run on a sqlite database.
>
Looks like you should also change the create query. Here is the
passing test with sqlite.
class DBSessionTest(SessionTest):
"""Session test with db store."""
def make_session(self, app):
db = webtest.setup_database("sqlite")
#db.printing = True
db.query(""
+ "CREATE TABLE session ("
+ " session_id char(128) unique not null,"
+ " atime timestamp default CURRENT_TIMESTAMP,"
+ " 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("sqlite")
self.db.query('DROP TABLE session')
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---