예제 #1
0
    def test_get_scan_id_unitialised_scanid_should_raise(self):
        """
        Test getScanId(self)
        """
        sfp = SpiderFootPlugin()

        with self.assertRaises(TypeError):
            sfp.getScanId()
예제 #2
0
    def test_get_scan_id(self):
        """
        Test getScanId(self)
        """
        sfp = SpiderFootPlugin()

        sfp.getScanId()
        self.assertEqual('TBD', 'TBD')
    def test_get_scan_id_should_return_a_string(self):
        """
        Test getScanId(self)
        """
        sfp = SpiderFootPlugin()

        scan_id = 'example scan id'
        sfp.setScanId(scan_id)

        get_scan_id = sfp.getScanId()
        self.assertEqual(str, type(get_scan_id))
        self.assertEqual(scan_id, get_scan_id)
    def test_set_scan_id_should_set_a_scan_id(self):
        """
        Test setScanId(self, id)
        """
        sfp = SpiderFootPlugin()

        scan_id = '1234'
        sfp.setScanId(scan_id)

        get_scan_id = sfp.getScanId()
        self.assertIsInstance(get_scan_id, str)
        self.assertEqual(scan_id, get_scan_id)