Cache user session

This commit is contained in:
Miguel Grinberg
2022-09-24 19:40:28 +01:00
parent 1547e861ee
commit 01947b101e
2 changed files with 11 additions and 4 deletions

View File

@@ -19,6 +19,9 @@ class TestSession(unittest.TestCase):
@self.app.get('/')
def index(req):
session = get_session(req)
session2 = get_session(req)
session2['foo'] = 'bar'
self.assertEqual(session['foo'], 'bar')
return str(session.get('name'))
@self.app.get('/with')