def test_analyze_wp_access_logs(self): """Tests the analyze_wp_access_logs method.""" config.LoadConfig() task = wordpress.WordpressAccessLogAnalysisTask() report = task.analyze_wp_access_logs(self.WORDPRESS_ACCESS_LOGS) self.assertEqual(report, self.WORDPRESS_PWNED_REPORT)
def create_tasks(self, evidence): """Create task. Args: evidence: List of evidence object to process Returns: A list of tasks to schedule. """ evidence = [ e for e in evidence if e.artifact_name in ACCESS_LOG_ARTIFACTS ] return [wordpress.WordpressAccessLogAnalysisTask() for _ in evidence]
def test_analyze_wp_access_logs(self): """Tests the analyze_wp_access_logs method.""" config.LoadConfig() task = wordpress.WordpressAccessLogAnalysisTask() (report, priority, summary) = task.analyze_wp_access_logs(self.WORDPRESS_ACCESS_LOGS) self.assertEqual(report, self.WORDPRESS_PWNED_REPORT) self.assertEqual(priority, 20) self.assertEqual(summary, 'Wordpress access logs found (install, theme_edit)')