'Test we can parse a standard file.'

def testBasicParsing(self):

    hist_file = os.path.join(self.base_path, 'index.dat')
    c = ie_history.IEParser(open(hist_file, 'rb'))
    entries = [x for x in c.Parse()]
    time_results = [x['mtime'] for x in entries]
    self.assertEqual(time_results, sorted(time_results))
    self.assertEqual(entries[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)
