'Ensure we can extract jobs from a crontab file.'

def testCronTabParser(self):

    parser = cron_file_parser.CronTabParser()
    results = []
    path = os.path.join(self.base_path, 'parser_test', 'crontab')
    plist_file = open(path, 'rb')
    stat = rdf_client.StatEntry(pathspec=rdf_paths.PathSpec(path=path, pathtype=rdf_paths.PathSpec.PathType.OS), st_mode=16877)
    results.extend(list(parser.Parse(stat, plist_file, None)))
    self.assertEqual(len(results), 1)
    for result in results:
        self.assertEqual(result.jobs[0].minute, '1')
        self.assertEqual(result.jobs[0].hour, '2')
        self.assertEqual(result.jobs[0].dayofmonth, '3')
        self.assertEqual(result.jobs[0].month, '4')
        self.assertEqual(result.jobs[0].dayofweek, '5')
        self.assertEqual(result.jobs[0].command, '/usr/bin/echo    "test"')
