'Validate the operation progress is interpreted correctly'

@ddt.data(False, True)
def test_get_pool_operation_progress(self, expect_complete):

    pool = copy.deepcopy(eseries_fake.STORAGE_POOL)
    if expect_complete:
        pool_progress = []
    else:
        pool_progress = copy.deepcopy(eseries_fake.FAKE_POOL_ACTION_PROGRESS)
    expected_actions = set((action['currentAction'] for action in pool_progress))
    expected_eta = reduce((lambda x, y: (x + y['estimatedTimeToCompletion'])), pool_progress, 0)
    self.library._client.get_pool_operation_progress = mock.Mock(return_value=pool_progress)
    (complete, actions, eta) = self.library._get_pool_operation_progress(pool['id'])
    self.assertEqual(expect_complete, complete)
    self.assertEqual(expected_actions, actions)
    self.assertEqual(expected_eta, eta)
