'FileType filters restrict results to specified file types.'

def testFileTypeParse(self):

    all_types = {'BLOCK': self._GenStat(st_mode=24992), 'Character': self._GenStat(st_mode=8608), 'directory': self._GenStat(st_mode=16873), 'fiFO': self._GenStat(st_mode=4534), 'REGULAR': self._GenStat(st_mode=33204), 'socket': self._GenStat(st_mode=49568), 'SymLink': self._GenStat(st_mode=41471)}
    filt = filters.StatFilter()
    for (file_type, expected) in all_types.iteritems():
        filt._Flush()
        results = filt.Parse(all_types.values(), ('file_type:%s' % file_type))
        self.assertEqual(1, len(results), ('Expected    exactly    1    %s' % file_type))
        self.assertEqual(expected, results[0], ('Expected    stat    %s,    got    %s' % (expected, results[0])))
