Ejemplo n.º 1
0
    def testGetValue(self):
        """Tests the GetValue function."""
        knowledge_base_object = knowledge_base.KnowledgeBase()

        plugin = macosx.MacOSXHostname()
        plugin.Run(self._searcher, knowledge_base_object)

        self.assertEqual(knowledge_base_object.hostname, u'Plaso\'s Mac mini')
Ejemplo n.º 2
0
    def testGetValue(self):
        """Tests the GetValue function."""
        pre_obj = event.PreprocessObject()
        plugin = macosx.MacOSXHostname(pre_obj)

        plugin.Run(self._searcher)

        hostname = getattr(pre_obj, 'hostname', None)
        self.assertEquals(hostname, u'Plaso\'s Mac mini')