#NEWLINE# def test_db_write_decorator( self ) : #NEWLINE# #INDENT# 'The @db_write decorator should make any view set the cookie.' #NEWLINE# req = self . request #NEWLINE# req . method = 'GET' #NEWLINE# def view( req ) : #NEWLINE# #INDENT# return HttpResponse ( ) #NEWLINE# #UNINDENT# response = self . middleware . process_response ( req , view ( req ) ) #NEWLINE# assert ( PINNING_COOKIE not in response . cookies ) #NEWLINE# @ db_write #NEWLINE# def write_view( req ) : #NEWLINE# #INDENT# return HttpResponse ( ) #NEWLINE# #UNINDENT# response = self . middleware . process_response ( req , write_view ( req ) ) #NEWLINE# assert ( PINNING_COOKIE in response . cookies )