#NEWLINE# def test_should_return_response_if_it_is_not_in_cache( self ) : #NEWLINE# #INDENT# class TestView ( views . APIView ) : #NEWLINE# #INDENT# @ cache_response ( ) #NEWLINE# def get( self , request , * args , **kwargs ) : #NEWLINE# #INDENT# return Response ( 'Response from method 1' ) #NEWLINE# #UNINDENT# #UNINDENT# view_instance = TestView ( ) #NEWLINE# response = view_instance . dispatch ( request = response . request ) #NEWLINE# self . assertEqual ( response . data , 'Response from method 1' ) #NEWLINE# self . assertEqual ( type ( response ) , Response )