def test_time_taken(self): start=datetime.datetime.now() negix.delete_table() log_file = open('C:\Users\zoheb\Desktop\project\logs.txt', 'r') req=negix.process_log(log_file) negix.Processing_failures() negix.log_count(req) negix.page_count(negix.page_view(req,'19/Jun/2012:09:17:27 +0100',50)) negix.page_count(negix.unique_hit(req,'19/Jun/2012')) end=datetime.datetime.now() print end-start
def test_count(self): negix.delete_table() log_file = open('C:\Users\zoheb\Desktop\project\logs.txt', 'r') self.assertEqual(negix.log_count(negix.process_log(log_file)),5) self.assertEqual(negix.Processing_failures(),1)