示例#1
0
    def test_arg_lookup(self):
        def dummy_func(first, second, third, fourth='fifth'):
            pass

        expected_dict = {'args': ['first', 'second', 'third'], 'kwargs': {'fourth': 'fifth'}}
        ret = utils.arg_lookup(dummy_func)
        self.assertEqual(expected_dict, ret)
示例#2
0
文件: utils_test.py 项目: Roche/salt
    def test_arg_lookup(self):
        def dummy_func(first, second, third, fourth='fifth'):
            pass

        expected_dict = {'args': ['first', 'second', 'third'], 'kwargs': {'fourth': 'fifth'}}
        ret = utils.arg_lookup(dummy_func)
        self.assertEqual(expected_dict, ret)
示例#3
0
    def test_arg_lookup(self):
        def dummy_func(first, second, third, fourth="fifth"):
            pass

        expected_dict = {"args": ["first", "second", "third"], "kwargs": {"fourth": "fifth"}}
        ret = utils.arg_lookup(dummy_func)
        self.assertEqual(expected_dict, ret)