#NEWLINE# def test_functional_create_container_and_object_then_delete_all( self ) : #NEWLINE# #INDENT# names_list = [ '111' , '222' , '333' , '444' , '555' ] #NEWLINE# scenario = objects . SwiftObjects ( self . context ) #NEWLINE# scenario . generate_random_name = mock . MagicMock ( side_effect = names_list ) #NEWLINE# scenario . _delete_object = mock . MagicMock ( ) #NEWLINE# scenario . _delete_container = mock . MagicMock ( ) #NEWLINE# scenario . create_container_and_object_then_delete_all ( objects_per_container = 4 , object_size = 240 ) #NEWLINE# scenario . _delete_object . assert_has_calls ( [ mock . call ( '111' , name , atomic_action = False ) for name in names_list [ 1 : ] ] ) #NEWLINE# scenario . _delete_container . assert_called_once_with ( '111' ) #NEWLINE# self . _test_atomic_action_timer ( scenario . atomic_actions ( ) , 'swift.create_4_objects' ) #NEWLINE# self . _test_atomic_action_timer ( scenario . atomic_actions ( ) , 'swift.delete_4_objects' )