Exemple #1
0
 def scenario_invalid_settings_error_is_raised(self, test_settings,
                                               ref_exc_substr):
     with self.assertRaises(InvalidTestSettingsError) as cm:
         IDAPluginArguments.from_test_settings(test_settings)
     self.assertIn(ref_exc_substr, str(cm.exception))
Exemple #2
0
 def test_from_test_settings_args_is_present_when_set(self):
     test_settings = IDAPluginTestSettings(input='test.exe',
                                           args='--arg1 --arg2')
     args = IDAPluginArguments.from_test_settings(test_settings)
     self.assertEqual(args.args, test_settings.args)
Exemple #3
0
 def test_from_test_settings_output_file_has_correct_name_when_it_does_not_end_with_exe(
         self):
     test_settings = IDAPluginTestSettings(input='test.elf')
     args = IDAPluginArguments.from_test_settings(test_settings)
     self.assertEqual(args.output_file.name, 'test.elf.c')
Exemple #4
0
 def test_from_test_settings_output_file_is_automatically_set(self):
     test_settings = IDAPluginTestSettings(input='test.exe')
     args = IDAPluginArguments.from_test_settings(test_settings)
     self.assertIsNotNone(args.output_file)
Exemple #5
0
 def test_from_test_settings_idb_file_is_present_when_set(self):
     test_settings = IDAPluginTestSettings(input='test.exe', idb='file.idb')
     args = IDAPluginArguments.from_test_settings(test_settings)
     self.assertEqual(args.idb_file.name, test_settings.idb)
Exemple #6
0
 def test_from_test_settings_input_files_are_present_when_set(self):
     test_settings = IDAPluginTestSettings(input='test.exe')
     args = IDAPluginArguments.from_test_settings(test_settings)
     self.assertEqual(len(args.input_files), 1)
     self.assertEqual(args.input_files[0].name, test_settings.input)