#NEWLINE# def test_set_cookie( self ) : #NEWLINE# #INDENT# @ wptserve . handlers . handler #NEWLINE# def handler( request , response ) : #NEWLINE# #INDENT# return request . cookies [ 'name' ] . value #NEWLINE# #UNINDENT# route = ( 'GET' , '/test/set_cookie' , route ) #NEWLINE# self . server . router . register ( * route ) #NEWLINE# resp = self . request ( route [ 1 ] , headers = { #NEWLINE# #INDENT# 'Cookie' : 'name=value' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEquals ( resp . read ( ) , 'value' )