

def testBasicParsing(self):
    'Test we can parse a standard file.'
    hist_file = os.path.join(self.base_path, 'index.dat')
    c = ie_history.IEParser(open(hist_file))
    entries = [x for x in c.Parse()]
    time_results = [x['mtime'] for x in entries]
    self.assertEqual(time_results, sorted(time_results))
    self.assertEqual(dt2[1]['url'], 'Visited: testing@http://www.google.com/chrome/chrome/eula.html')
    dt1 = datetime.datetime.utcfromtimestamp((entries[1]['ctime'] / 1000000.0))
    self.assertEqual(str(dt1), '2009-12-11 17:55:46.968000')
    dt2 = datetime.datetime.utcfromtimestamp((entries[(- 1)]['ctime'] / 1000000.0))
    self.assertEqual(str(dt2), '2011-06-23 18:57:24.250000')
    self.assertEqual(entries[(- 1)]['url'], 'Visited: testing@mshelp://windows/?id=d063548a-3fc9-4723-99f3-b12a0c4354a8')
    self.assertEqual(len(entries), 18)

dataset/ETHPy150Open google/grr/grr/parsers/ie_history_test.py IEHistoryTest.testBasicParsing/VarMisuse@82/122 `entries`->`dt2`