def test_scanLogEvent_should_create_a_scan_log_event(self):
        """
        Test scanLogEvent(self, instanceId, classification, message, component=None)
        """
        sfdb = SpiderFootDb(self.default_options, False)
        sfdb.scanLogEvent("", "", "", None)

        self.assertEqual('TBD', 'TBD')
Beispiel #2
0
    def test_scan_log_event_invalid_message_should_raise(self):
        """
        Test scanLogEvent(self, instanceId, classification, message, component=None)
        """
        sfdb = SpiderFootDb(self.default_options, False)

        invalid_types = [None, list(), dict()]
        for invalid_type in invalid_types:
            with self.subTest(invalid_type=invalid_type):
                with self.assertRaises(TypeError) as cm:
                    sfdb.scanLogEvent("", "", invalid_type)
    def test_scanLogEvent_argument_classification_of_invalid_type_should_raise_TypeError(self):
        """
        Test scanLogEvent(self, instanceId, classification, message, component=None)
        """
        sfdb = SpiderFootDb(self.default_options, False)

        instance_id = "example instance id"
        invalid_types = [None, list(), dict(), int()]
        for invalid_type in invalid_types:
            with self.subTest(invalid_type=invalid_type):
                with self.assertRaises(TypeError) as cm:
                    sfdb.scanLogEvent(instance_id, invalid_type, "")
Beispiel #4
0
 def test_scan_log_event(self):
     """
     Test scanLogEvent(self, instanceId, classification, message, component=None)
     """
     sfdb = SpiderFootDb(self.default_options, False)
     sfdb.scanLogEvent("", "", "", None)