#NEWLINE# def test_get_save_session( self ) : #NEWLINE# #INDENT# with self . _get_app ( ) . get_test_context ( ) as request : #NEWLINE# #INDENT# store = request . session_store #NEWLINE# session = store . get_session ( ) #NEWLINE# self . assertEqual ( isinstance ( session , SecureCookieSession ) , True ) #NEWLINE# self . assertEqual ( session , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# session [ 'foo' ] = 'bar' #NEWLINE# response = Response ( ) #NEWLINE# store . save ( response ) #NEWLINE# #UNINDENT# with self . _get_app ( ) . get_test_context ( '/' , headers = { #NEWLINE# #INDENT# 'Cookie' : '\n' . join ( response . headers . getlist ( 'Set-Cookie' ) ) , #NEWLINE# #UNINDENT# } ) as request : #NEWLINE# #INDENT# store = request . session_store #NEWLINE# session = store . get_session ( ) #NEWLINE# self . assertEqual ( isinstance ( session , SecureCookieSession ) , True ) #NEWLINE# self . assertEqual ( session , { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# #UNINDENT# } )