Пример #1
0
 def test_ptp_init_parser_tool_ioerror(self):
     PTP.supported = {'mock': [MockParserIOError]}
     my_ptp = PTP(tool_name='mock')
     my_ptp._init_parser()
     self.assertIsNone(my_ptp.parser)
Пример #2
0
 def test_ptp_init_parser_tool(self):
     PTP.supported = {'mock': [MockParser]}
     my_ptp = PTP(tool_name='mock')
     my_ptp._init_parser()
     self.assertTrue(my_ptp.parser is not None)
Пример #3
0
 def test_ptp_init_parser_tool_version_not_supported(self):
     PTP.supported = {'mock': [MockParserVersionNotSupported]}
     my_ptp = PTP(tool_name='mock')
     my_ptp._init_parser()
     self.assertIsNone(my_ptp.parser)
Пример #4
0
 def test_ptp_init_parser_no_tool(self):
     my_ptp = PTP()
     my_ptp._init_parser()
     self.assertIsNone(my_ptp.parser)
Пример #5
0
 def test_ptp_init_parser_tool_ioerror(self):
     PTP.supported = {'mock': [MockParserIOError]}
     my_ptp = PTP(tool_name='mock')
     my_ptp._init_parser()
     self.assertIsNone(my_ptp.parser)
Пример #6
0
 def test_ptp_init_parser_tool_version_not_supported(self):
     PTP.supported = {'mock': [MockParserVersionNotSupported]}
     my_ptp = PTP(tool_name='mock')
     my_ptp._init_parser()
     self.assertIsNone(my_ptp.parser)
Пример #7
0
 def test_ptp_init_parser_tool(self):
     PTP.supported = {'mock': [MockParser]}
     my_ptp = PTP(tool_name='mock')
     my_ptp._init_parser()
     self.assertTrue(my_ptp.parser is not None)
Пример #8
0
 def test_ptp_init_parser_no_tool(self):
     my_ptp = PTP()
     my_ptp._init_parser()
     self.assertIsNone(my_ptp.parser)