def test_timestamp_parse(self): line = "(timestamp: Fri Oct 30 15:29:45 +0000 2015)" _, ts = average_degree.parse_line(line) line2 = "(timestamp: Fri Oct 30 15:29:50 +0000 2015)" _, ts2 = average_degree.parse_line(line2) self.assertEquals(ts + 5, ts2)
def test_parse_line(self): line = "We're #hiring! Click to apply: SMB Analyst #BusinessMgmt #NettempsJobs #MenloPark (timestamp: Fri Oct 30 15:29:45 +0000 2015)" tags, ts = average_degree.parse_line(line) self.assertEquals( tags, ["hiring", "BusinessMgmt", "NettempsJobs", "MenloPark"])