Пример #1
0
 def test_scan_export_logs_should_return_bytes(self):
     """
     Test scanexportlogs(self: 'SpiderFootWebUi', id: str, dialect: str = "excel") -> str
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(self.web_default_options, opts)
     logs = sfwebui.scanexportlogs("scan id", "excel")
     self.assertIsInstance(logs, bytes)
Пример #2
0
 def test_scan_export_logs_invalid_scan_id_should_return_string(self):
     """
     Test scanexportlogs(self: 'SpiderFootWebUi', id: str, dialect: str = "excel") -> str
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(self.web_default_options, opts)
     logs = sfwebui.scanexportlogs(None, "excel")
     self.assertIsInstance(logs, str)
     self.assertIn("Scan ID not found.", logs)