def fake_call_method(module, method, *args, **kwargs): if method == 'AddPortGroup': raise vexc.VMwareDriverException()
def side_effect(*args, **kwargs): exception = vmware_exceptions.VMwareDriverException() exception.message = dvs_const.LOGIN_PROBLEM_TEXT raise exception