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_stopscan_invalid_scanid_should_return_an_error(self): """ Test stopscan(self, id) """ opts = self.default_options opts['__modules__'] = dict() sfwebui = SpiderFootWebUi(self.web_default_options, opts) stop_scan = sfwebui.stopscan("example scan id") self.assertIsInstance(stop_scan, dict) self.assertEqual("Scan example scan id does not exist", stop_scan.get('error').get('message'))