#NEWLINE# @ patch . object ( utils , 'get_resource_children' ) #NEWLINE# @ patch . object ( utils , 'get_resource_siblings' ) #NEWLINE# def test_resource_view_attrs_no_subresources( self , get_sib , get_child ) : #NEWLINE# #INDENT# child_res = self . _get_mock_method_resources ( 'get' ) #NEWLINE# child_res [ 0 ] . path = '/items' #NEWLINE# get_child . return_value = child_res #NEWLINE# get_sib . return_value = self . _get_mock_method_resources ( 'get' , 'post' , 'put' , 'patch' , 'delete' ) #NEWLINE# resource = Mock ( ) #NEWLINE# attrs = utils . resource_view_attrs ( resource , singular = False ) #NEWLINE# get_sib . assert_called_once_with ( resource ) #NEWLINE# get_child . assert_called_once_with ( resource ) #NEWLINE# assert ( attrs == set ( [ 'create' , 'delete_many' , 'index' , 'update_many' ] ) )