예제 #1
0
    def testGRRVersionReportPluginWithNoActivityToReport(self):
        # Scan for activity to be reported.
        cron_system.GRRVersionBreakDownCronJob(None, None).Run()

        report = report_plugins.GetReportByName(
            client_report_plugins.GRRVersion30ReportPlugin.__name__)

        api_report_data = report.GetReportData(
            stats_api.ApiGetReportArgs(name=report.__class__.__name__,
                                       client_label="All"))

        self.assertEqual(
            api_report_data,
            rdf_report_plugins.ApiReportData(
                representation_type=RepresentationType.LINE_CHART,
                line_chart=rdf_report_plugins.ApiLineChartReportData(data=[])))
예제 #2
0
    def testLastActiveReportPluginWithNoActivityToReport(self):
        # Scan for activity to be reported.
        flow_test_lib.TestFlowHelper(cron_system.LastAccessStats.__name__,
                                     token=self.token)

        report = report_plugins.GetReportByName(
            client_report_plugins.LastActiveReportPlugin.__name__)

        api_report_data = report.GetReportData(stats_api.ApiGetReportArgs(
            name=report.__class__.__name__, client_label="All"),
                                               token=self.token)

        self.assertEqual(
            api_report_data,
            rdf_report_plugins.ApiReportData(
                representation_type=RepresentationType.LINE_CHART,
                line_chart=rdf_report_plugins.ApiLineChartReportData(data=[])))