コード例 #1
0
    def test_scan_history_missing_scanid_should_return_error(self):
        """
        Test scanhistory(self, id)
        """
        opts = self.default_options
        opts['__modules__'] = dict()
        sfwebui = SpiderFootWebUi(self.web_default_options, opts)

        scan_history = sfwebui.scanhistory(None)
        self.assertIsInstance(scan_history, dict)
        self.assertEqual("No scan specified", scan_history.get('error').get('message'))
        scan_history = sfwebui.scanhistory("example scan id")
        self.assertIsInstance(scan_history, list)
コード例 #2
0
 def test_scan_history_should_return_bytes(self):
     """
     Test scanhistory(self, id)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     scan_history = sfwebui.scanhistory(None)
     self.assertIsInstance(scan_history, bytes)
コード例 #3
0
 def test_scan_history_should_return_a_list(self):
     """
     Test scanhistory(self, id)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(self.web_default_options, opts)
     scan_history = sfwebui.scanhistory("example scan id")
     self.assertIsInstance(scan_history, list)