def testInvokeArgNamesFunc(self): def test_function(a, b): return a with mock.patch( 'recipe_engine.loader._invoke_with_properties') as mocked_invoke: loader.invoke_with_properties(test_function, None, None) args, _ = mocked_invoke.call_args self.assertTrue(['a', 'b'] in args)
def testInvokeArgNamesFunc(self): def test_function(a, b): return a with mock.patch( 'recipe_engine.loader._invoke_with_properties') as mocked_invoke: loader.invoke_with_properties(test_function, None, None, None) args, _ = mocked_invoke.call_args self.assertTrue(['a', 'b'] in args)
def testInvokeArgNamesClass(self): class TestClass(object): def __init__(self, api, foo, bar): pass with mock.patch( 'recipe_engine.loader._invoke_with_properties') as mocked_invoke: loader.invoke_with_properties(TestClass, None, None) args, _ = mocked_invoke.call_args self.assertTrue(['api', 'foo', 'bar'] in args)
def testInvokeArgNamesClass(self): class TestClass(object): def __init__(self, api, foo, bar): pass with mock.patch( 'recipe_engine.loader._invoke_with_properties') as mocked_invoke: loader.invoke_with_properties(TestClass, None, None, None) args, _ = mocked_invoke.call_args self.assertTrue(['api', 'foo', 'bar'] in args)
def invoke(self, callable, all_properties, prop_defs, **kwargs): return loader.invoke_with_properties(callable, all_properties, prop_defs, **kwargs)
def invoke(self, callable, all_properties, prop_defs, **kwargs): return loader.invoke_with_properties( callable, all_properties, prop_defs, **kwargs)