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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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()
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)
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)
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)
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)
def test_index(self): """ Test index(self) """ opts = self.default_options opts['__modules__'] = dict() sfwebui = SpiderFootWebUi(opts) index = sfwebui.index() self.assertIsInstance(index, str)
def test_init_no_options_should_raise(self): """ Test __init__(self, config) """ with self.assertRaises(TypeError): SpiderFootWebUi(None) with self.assertRaises(ValueError): SpiderFootWebUi(dict())
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)