#NEWLINE# def testGetOnlyIfCachedCacheHit( self ) : #NEWLINE# #INDENT# uri = urllib . parse . urljoin ( base , '304/test_etag.txt' ) #NEWLINE# ( response , content ) = self . http . request ( uri , 'GET' ) #NEWLINE# ( response , content ) = self . http . request ( uri , 'GET' , headers = { #NEWLINE# #INDENT# 'cache-control' : 'only-if-cached' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( self . fromcache , True ) #NEWLINE# self . assertEqual ( response . status , 200 )