¡@

Home 

OpenStack Study: tools.py

OpenStack Index

**** CubicPower OpenStack Study ****

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

**** CubicPower OpenStack Study ****

def verify_mock_calls(mocked_call, expected_calls_and_values):

    expected_calls = [call[0] for call in expected_calls_and_values]

    mocked_call.assert_has_calls(expected_calls)