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')
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')