#NEWLINE# def _test_get_data_by_id( self , key , response_value , response_body ) : #NEWLINE# #INDENT# class FakeResource2 ( FakeResource ) : #NEWLINE# #INDENT# resource_key = key #NEWLINE# service = 'my_service' #NEWLINE# #UNINDENT# response = mock . Mock ( ) #NEWLINE# response . json = mock . Mock ( return_value = response_body ) #NEWLINE# sess = mock . Mock ( ) #NEWLINE# sess . get = mock . Mock ( return_value = response ) #NEWLINE# r_id = 'my_id' #NEWLINE# resp = FakeResource2 . get_data_by_id ( sess , resource_id = r_id ) #NEWLINE# self . assertEqual ( response_value , resp ) #NEWLINE# sess . get . assert_called_with ( utils . urljoin ( FakeResource2 . base_path , r_id ) , endpoint_filter = FakeResource2 . service ) #NEWLINE# path_args = { #NEWLINE# #INDENT# 'parent_name' : 'my_name' , #NEWLINE# #UNINDENT# } #NEWLINE# resp = FakeResource2 . get_data_by_id ( sess , resource_id = r_id , path_args = path_args ) #NEWLINE# self . assertEqual ( response_value , resp ) #NEWLINE# sess . get . assert_called_with ( utils . urljoin ( ( FakeResource2 . base_path % path_args ) , r_id ) , endpoint_filter = FakeResource2 . service )