#NEWLINE# def test__translate_response_with_body_no_resource_key( self ) : #NEWLINE# #INDENT# class Test ( resource2 . Resource ) : #NEWLINE# #INDENT# attr = resource2 . Body ( 'attr' ) #NEWLINE# #UNINDENT# body = { #NEWLINE# #INDENT# 'attr' : 'value' , #NEWLINE# #UNINDENT# } #NEWLINE# response = mock . Mock ( ) #NEWLINE# response . headers = dict ( ) #NEWLINE# response . json . return_value = body #NEWLINE# sot = Test ( ) #NEWLINE# sot . _transpose_component = mock . Mock ( side_effect = [ body , dict ( ) ] ) #NEWLINE# sot . _translate_response ( response , has_body = True ) #NEWLINE# self . assertEqual ( 'value' , sot . attr ) #NEWLINE# self . assertEqual ( dict ( ) , sot . _body . dirty ) #NEWLINE# self . assertEqual ( dict ( ) , sot . _header . dirty )