예제 #1
0
 def test_get_args_return_parsed_args(self, mock_base_parser):
     mock_parser = Mock()
     mock_parser.parse_args.return_value = 'pluto'
     mock_base_parser.return_value = mock_parser
     retval = arguments.get_args(['alpha', 'bravo'])
     call_count = mock_parser.add_argument.call_count
     self.assertGreater(call_count, 0)
예제 #2
0
    def test_get_args_calls_add_argument(self, mock_ArgumentParser):
        mock_arg_parser = Mock()
        mock_ArgumentParser.return_value = mock_arg_parser

        retval = arguments.get_args(['alpha', 'bravo'])
        call_count = mock_arg_parser.add_argument.call_count
        self.assertGreater(call_count, 15)