def test_scan_viz_should_return_a_string(self):
     """
     Test scanviz(self, id, gexf="0")
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(self.web_default_options, opts)
     scan_viz = sfwebui.scanviz(None, None)
     self.assertIsInstance(scan_viz, str)
Exemplo n.º 2
0
 def test_stopscan(self):
     """
     Test stopscan(self, id)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     stop_scan = sfwebui.stopscan("example scan id")
     self.assertIsInstance(stop_scan, str)
Exemplo n.º 3
0
 def test_scanerrors_should_return_bytes(self):
     """
     Test scanerrors(self, id, limit=None)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     scan_errors = sfwebui.scanerrors(None, None)
     self.assertIsInstance(scan_errors, bytes)
Exemplo n.º 4
0
 def test_optsraw_should_return_bytes(self):
     """
     Test optsraw(self)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     opts_raw = sfwebui.optsraw()
     self.assertIsInstance(opts_raw, bytes)
Exemplo n.º 5
0
 def test_modules_should_return_bytes(self):
     """
     Test modules(self)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     modules = sfwebui.eventtypes()
     self.assertIsInstance(modules, bytes)
Exemplo n.º 6
0
 def test_clonescan(self):
     """
     Test clonescan(self, id)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     clone_scan = sfwebui.clonescan("example scan instance")
     self.assertIsInstance(clone_scan, str)
Exemplo n.º 7
0
 def test_scaninfo(self):
     """
     Test scaninfo(self, id)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     scan_info = sfwebui.scaninfo("example scan instance")
     self.assertIsInstance(scan_info, str)
Exemplo n.º 8
0
 def test_scanstatus_should_return_a_string(self):
     """
     Test scanstatus(self, id)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     scan_status = sfwebui.scanstatus("example scan instance")
     self.assertIsInstance(scan_status, str)
Exemplo n.º 9
0
 def test_scaneventresultsunique_should_return_a_string(self):
     """
     Test scaneventresultsunique(self, id, eventType, filterfp=False)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     scan_results = sfwebui.scaneventresultsunique(None, None, None)
     self.assertIsInstance(scan_results, str)
Exemplo n.º 10
0
 def test_scan_element_type_discovery_should_return_a_string(self):
     """
     Test scanelementtypediscovery(self, id, eventType)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(self.default_web_options, opts)
     scan_element_type_discovery = sfwebui.scanelementtypediscovery(None, None)
     self.assertIsInstance(scan_element_type_discovery, str)
Exemplo n.º 11
0
 def test_eventtypes_should_return_a_string(self):
     """
     Test eventtypes(self)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     event_types = sfwebui.eventtypes()
     self.assertIsInstance(event_types, str)
Exemplo n.º 12
0
 def test_scaneventresults_should_return_bytes(self):
     """
     Test scaneventresults(self, id, eventType, filterfp=False)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(self.default_web_options, opts)
     scan_results = sfwebui.scaneventresults(None, None, None)
     self.assertIsInstance(scan_results, bytes)
Exemplo n.º 13
0
 def test_scansummary_should_return_bytes(self):
     """
     Test scansummary(self, id, by)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(self.default_web_options, opts)
     scan_summary = sfwebui.scansummary(None, None)
     self.assertIsInstance(scan_summary, bytes)
    def test_error_page(self):
        """
        Test error_page(self)
        """
        opts = self.default_options
        opts['__modules__'] = dict()

        sfwebui = SpiderFootWebUi(self.web_default_options, opts)
        sfwebui.error_page()
Exemplo n.º 15
0
 def test_scan_viz_multi_should_return_a_string(self):
     """
     Test scanvizmulti(self, ids, gexf="1")
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     scan_viz_multi = sfwebui.scanvizmulti(None, None)
     self.assertIsInstance(scan_viz_multi, str)
Exemplo n.º 16
0
 def test_search_should_return_a_string(self):
     """
     Test search(self, id=None, eventType=None, value=None)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     search_results = sfwebui.search(None, None, None)
     self.assertIsInstance(search_results, str)
Exemplo n.º 17
0
 def test_rerunscanmulti(self):
     """
     Test rerunscanmulti(self, ids)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     rerunscanmulti = sfwebui.rerunscanmulti("example scan instance")
     self.assertIsInstance(rerunscanmulti, str)
Exemplo n.º 18
0
 def test_scan_history_should_return_a_string(self):
     """
     Test scanhistory(self, id)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     scan_history = sfwebui.scanhistory(None)
     self.assertIsInstance(scan_history, str)
Exemplo n.º 19
0
 def test_index(self):
     """
     Test index(self)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     index = sfwebui.index()
     self.assertIsInstance(index, str)
Exemplo n.º 20
0
    def test_init_no_options_should_raise(self):
        """
        Test __init__(self, config)
        """
        with self.assertRaises(TypeError):
            SpiderFootWebUi(None)

        with self.assertRaises(ValueError):
            SpiderFootWebUi(dict())
Exemplo n.º 21
0
 def test_optsexport_should_return_a_string(self):
     """
     Test optsexport(self, pattern)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     opts_export = sfwebui.optsexport(None)
     self.assertIsInstance(opts_export, str)
Exemplo n.º 22
0
 def test_clean_user_input_should_return_a_list(self):
     """
     Test cleanUserInput(self, inputList)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     clean_user_input = sfwebui.cleanUserInput(list())
     self.assertIsInstance(clean_user_input, list)
Exemplo n.º 23
0
 def test_scandeletemulti(self):
     """
     Test scandeletemulti(self, ids, confirm=None)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     scan_delete = sfwebui.scandeletemulti("example scan id", None)
     self.assertIsInstance(scan_delete, str)
Exemplo n.º 24
0
 def test_scan_event_result_export_multi(self):
     """
     Test scaneventresultexportmulti(self, ids, dialect="excel")
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     search_results = sfwebui.scaneventresultexport("", "", "excel")
     self.assertIsInstance(search_results, bytes)
Exemplo n.º 25
0
 def test_ping_should_return_bytes(self):
     """
     Test ping(self)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     ping = sfwebui.ping()
     self.assertIsInstance(ping, bytes)
Exemplo n.º 26
0
 def test_scan_search_result_export(self):
     """
     Test scansearchresultexport(self, id, eventType=None, value=None, dialect="excel")
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     search_results = sfwebui.scansearchresultexport("", "", "excel")
     self.assertIsInstance(search_results, bytes)
Exemplo n.º 27
0
 def test_scanlog_should_return_bytes(self):
     """
     Test scanlog(self, id, limit=None, rowId=None, reverse=None)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     scan_log = sfwebui.scanlog(None, None, None, None)
     self.assertIsInstance(scan_log, bytes)
Exemplo n.º 28
0
 def test_scan_export_json_multi(self):
     """
     Test scanexportjsonmulti(self, ids)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     search_results = sfwebui.scanexportjsonmulti(None)
     self.assertIsInstance(search_results, bytes)
Exemplo n.º 29
0
 def test_scanlist_should_return_bytes(self):
     """
     Test scanlist(self)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(opts)
     scan_list = sfwebui.scanlist()
     self.assertIsInstance(scan_list, bytes)
Exemplo n.º 30
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)