#NEWLINE# def _testHttpCaching( self , url , check_etags = False , check_last_modified = False ) : #NEWLINE# #INDENT# response = self . client . get ( url ) #NEWLINE# self . assertHttpOK ( response , check_etag = check_etags , check_last_modified = check_last_modified ) #NEWLINE# headers = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if check_etags : #NEWLINE# #INDENT# headers [ 'HTTP_IF_NONE_MATCH' ] = response [ 'ETag' ] #NEWLINE# #UNINDENT# if check_last_modified : #NEWLINE# #INDENT# headers [ 'HTTP_IF_MODIFIED_SINCE' ] = response [ 'Last-Modified' ] #NEWLINE# #UNINDENT# response = self . client . get ( url , ** headers ) #NEWLINE# self . assertHttpNotModified ( response )