"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/test_argument_parser.py" between
ospd-2.0.0.tar.gz and ospd-2.0.1.tar.gz

About: OSPd is a base class for scanner wrappers which share the same communication protocol: OSP (OpenVAS Scanner Protocol).

test_argument_parser.py  (ospd-2.0.0):test_argument_parser.py  (ospd-2.0.1)
skipping to change at line 37 skipping to change at line 37
from io import StringIO from io import StringIO
from typing import List from typing import List
from ospd.parser import ( from ospd.parser import (
create_parser, create_parser,
Arguments, Arguments,
DEFAULT_ADDRESS, DEFAULT_ADDRESS,
DEFAULT_PORT, DEFAULT_PORT,
DEFAULT_KEY_FILE, DEFAULT_KEY_FILE,
DEFAULT_NICENESS, DEFAULT_NICENESS,
DEFAULT_SCANINFO_STORE_TIME,
DEFAULT_CONFIG_PATH,
DEFAULT_UNIX_SOCKET_PATH,
DEFAULT_PID_PATH,
DEFAULT_LOCKFILE_DIR_PATH,
) )
class ArgumentParserTestCase(unittest.TestCase): class ArgumentParserTestCase(unittest.TestCase):
def setUp(self): def setUp(self):
self.parser = create_parser('Wrapper name') self.parser = create_parser('Wrapper name')
def parse_args(self, args: List[str]) -> Arguments: def parse_args(self, args: List[str]) -> Arguments:
return self.parser.parse_arguments(args) return self.parser.parse_arguments(args)
@patch('sys.stderr', new_callable=StringIO) @patch('sys.stderr', new_callable=StringIO)
skipping to change at line 95 skipping to change at line 100
self.assertEqual('/etc/passwd', args.key_file) self.assertEqual('/etc/passwd', args.key_file)
def test_defaults(self): def test_defaults(self):
args = self.parse_args([]) args = self.parse_args([])
self.assertEqual(args.key_file, DEFAULT_KEY_FILE) self.assertEqual(args.key_file, DEFAULT_KEY_FILE)
self.assertEqual(args.niceness, DEFAULT_NICENESS) self.assertEqual(args.niceness, DEFAULT_NICENESS)
self.assertEqual(args.log_level, logging.WARNING) self.assertEqual(args.log_level, logging.WARNING)
self.assertEqual(args.address, DEFAULT_ADDRESS) self.assertEqual(args.address, DEFAULT_ADDRESS)
self.assertEqual(args.port, DEFAULT_PORT) self.assertEqual(args.port, DEFAULT_PORT)
self.assertEqual(args.scaninfo_store_time, DEFAULT_SCANINFO_STORE_TIME)
self.assertEqual(args.config, DEFAULT_CONFIG_PATH)
self.assertEqual(args.unix_socket, DEFAULT_UNIX_SOCKET_PATH)
self.assertEqual(args.pid_file, DEFAULT_PID_PATH)
self.assertEqual(args.lock_file_dir, DEFAULT_LOCKFILE_DIR_PATH)
 End of changes. 2 change blocks. 
0 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)