def setup_mock_calls(mocked_call, expected_calls_and_values):
    return_values = [call[1] for call in expected_calls_and_values]
    mocked_call.side_effect = return_values
A convenient method to setup a sequence of mock calls.
dataset/ETHPy150Open openstack/neutron/neutron/tests/tools.py/setup_mock_calls