MCPcopy Index your code
hub / github.com/webpy/webpy / make_session

Method make_session

tests/test_session.py:146–160  ·  view source on GitHub ↗
(self, app)

Source from the content-addressed store, hash-verified

144 """Session test with db store."""
145
146 def make_session(self, app):
147 if os.path.exists("webpy.db"):
148 os.remove("webpy.db")
149
150 db = web.database(dbn="sqlite", db="webpy.db")
151 # db.printing = True
152 db.query(
153 ""
154 + "CREATE TABLE session ("
155 + " session_id char(128) unique not null,"
156 + " atime timestamp default (datetime('now','utc')),"
157 + " data text)"
158 )
159 store = web.session.DBStore(db, "session")
160 return web.session.Session(app, store, {"count": 0})
161
162
163class MemorySessionTest(SessionTest):

Callers

nothing calls this directly

Calls 1

queryMethod · 0.45

Tested by

no test coverage detected