#NEWLINE# def test_reserve_experiment_waiting( self ) : #NEWLINE# #INDENT# 'Reserve all the experiments to check that the next ones are in Waiting state' #NEWLINE# ( status , reservation1_id ) = self . coordinator . reserve_experiment ( ExperimentId ( 'exp1' , 'cat1' ) , DEFAULT_TIME , DEFAULT_PRIORITY , True , DEFAULT_INITIAL_DATA , DEFAULT_REQUEST_INFO , DEFAULT_CONSUMER_DATA ) #NEWLINE# expected_status = WSS . WaitingConfirmationQueueStatus ( reservation1_id , DEFAULT_URL ) #NEWLINE# self . assertEquals ( status , status ) #NEWLINE# ( status , reservation2_id ) = self . coordinator . reserve_experiment ( ExperimentId ( 'exp1' , 'cat1' ) , DEFAULT_TIME , DEFAULT_PRIORITY , True , DEFAULT_INITIAL_DATA , DEFAULT_REQUEST_INFO , DEFAULT_CONSUMER_DATA ) #NEWLINE# expected_status = WSS . WaitingConfirmationQueueStatus ( reservation2_id , DEFAULT_URL ) #NEWLINE# self . assertEquals ( expected_status , status ) #NEWLINE# ( status , reservation3_id ) = self . coordinator . reserve_experiment ( ExperimentId ( 'exp1' , 'cat1' ) , DEFAULT_TIME , DEFAULT_PRIORITY , True , DEFAULT_INITIAL_DATA , DEFAULT_REQUEST_INFO , DEFAULT_CONSUMER_DATA ) #NEWLINE# expected_status = WSS . WaitingQueueStatus ( reservation3_id , 0 ) #NEWLINE# self . assertEquals ( expected_status , status ) #NEWLINE# ( status , reservation4_id ) = self . coordinator . reserve_experiment ( ExperimentId ( 'exp1' , 'cat1' ) , DEFAULT_TIME , DEFAULT_PRIORITY , True , DEFAULT_INITIAL_DATA , DEFAULT_REQUEST_INFO , DEFAULT_CONSUMER_DATA ) #NEWLINE# expected_status = WSS . WaitingQueueStatus ( reservation4_id , 1 ) #NEWLINE# self . assertEquals ( expected_status , status )