#NEWLINE# def test_attribute( self ) : #NEWLINE# #INDENT# 'The cookie should get set if the _db_write attribute is True.' #NEWLINE# res = HttpResponse ( ) #NEWLINE# res . _db_write = True #NEWLINE# response = self . middleware . process_response ( self . request , res ) #NEWLINE# assert ( PINNING_COOKIE in response . cookies )