#NEWLINE# @ patch . object ( utils , 'get_resource_children' ) #NEWLINE# def test_dynamic_part_name_no_resources( self , get_children ) : #NEWLINE# #INDENT# get_children . return_value = [ ] #NEWLINE# resource = Mock ( resources = None ) #NEWLINE# part_name = utils . dynamic_part_name ( resource , 'stories' , 'default_id' ) #NEWLINE# assert ( get_children == 'stories_default_id' ) #NEWLINE# get_children . assert_called_once_with ( resource )