#NEWLINE# @ mock . patch . object ( time , 'sleep' ) #NEWLINE# def test_wait_volume_status_timeout( self , mock_sleep ) : #NEWLINE# #INDENT# fake_manager = FakeObject ( get = mock . Mock ( ) ) #NEWLINE# volume_available = FakeObject ( manager = volume_available , id = 'fake-id' , status = 'available' ) #NEWLINE# fake_manager . get . return_value = volume_available #NEWLINE# self . assertRaises ( exceptions . BackendException , self . store . _wait_volume_status , volume_available , 'available' , 'in-use' ) #NEWLINE# fake_manager . get . assert_called_with ( 'fake-id' )