Exemple #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)
Exemple #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)
Exemple #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)
Exemple #4
0
 def test_ptp_init_parser_no_tool(self):
     my_ptp = PTP()
     my_ptp._init_parser()
     self.assertIsNone(my_ptp.parser)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #8
0
 def test_ptp_init_parser_no_tool(self):
     my_ptp = PTP()
     my_ptp._init_parser()
     self.assertIsNone(my_ptp.parser)