def testAnalyse(self):
     t = ThroughputAnalyser(eventpath = self.testdir)
     t._analyseRepository = self.mockAnalyseRepository
     
     report = t.analyse(['repo1','repo2'], '2006-08-31')
     
     self.assertEquals(1000, report.records)
     self.assertEquals(2000.0, report.seconds)
     self.assertEquals(['repo1', 'repo2'], self.mockAnalyseRepository_arguments)
Example #2
0
    def testAnalyseNothing(self):
        t = ThroughputAnalyser(eventpath=self.testdir)
        t._analyseRepository = self.mockAnalyseRepository

        report = t.analyse([], '2006-08-31')

        self.assertEqual(0, report.records)
        self.assertEqual(0.0, report.seconds)
        self.assertEqual('-', report.recordsPerSecond())
        self.assertEqual('-', report.recordsPerDay())
Example #3
0
    def testAnalyse(self):
        t = ThroughputAnalyser(eventpath=self.testdir)
        t._analyseRepository = self.mockAnalyseRepository

        report = t.analyse(['repo1', 'repo2'], '2006-08-31')

        self.assertEqual(1000, report.records)
        self.assertEqual(2000.0, report.seconds)
        self.assertEqual(['repo1', 'repo2'],
                         self.mockAnalyseRepository_arguments)
 def testAnalyseNothing(self):
     t = ThroughputAnalyser(eventpath = self.testdir)
     t._analyseRepository = self.mockAnalyseRepository
     
     report = t.analyse([], '2006-08-31')
     
     self.assertEquals(0, report.records)
     self.assertEquals(0.0, report.seconds)
     self.assertEquals('-' , report.recordsPerSecond())
     self.assertEquals('-' , report.recordsPerDay())