#NEWLINE# def test_cached_views( self ) : #NEWLINE# #INDENT# '\n        A template view can be cached\n        ' #NEWLINE# response = self . client . get ( '/template/cached/bar/' ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# time . sleep ( 1.0 ) #NEWLINE# response2 = self . client . get ( '/template/cached/bar/' ) #NEWLINE# self . assertEqual ( response2 . status_code , 200 ) #NEWLINE# self . assertEqual ( response . content , response2 . content ) #NEWLINE# time . sleep ( 2.0 ) #NEWLINE# response2 = self . client . get ( '/template/cached/bar/' ) #NEWLINE# self . assertEqual ( response2 . status_code , 200 ) #NEWLINE# self . assertNotEqual ( response2 . content , response2 . content )