'Check we can download a collection that also references folders.'

def testDownloadCollectionWithFoldersEntries(self):

    fd = sequential_collection.GeneralIndexedCollection(self.collection_urn, token=self.token)
    fd.Add(rdf_file_finder.FileFinderResult(stat_entry=rdf_client.StatEntry(pathspec=rdf_paths.PathSpec(path='testfile5', pathtype='OS'))))
    fd.Add(rdf_file_finder.FileFinderResult(stat_entry=rdf_client.StatEntry(pathspec=rdf_paths.PathSpec(path='testdir1', pathtype='OS'), st_mode=stat.S_IFDIR)))
    with utils.TempDirectory() as tmpdir:
        export_utils.DownloadCollection(self.collection_urn, tmpdir, overwrite=True, dump_client_info=True, token=self.token, max_threads=2)
        expected_outdir = os.path.join(tmpdir, self.out.Path()[1:])
        self.assertTrue(('testfile5' in os.listdir(expected_outdir)))
        self.assertTrue(('testdir1' in os.listdir(expected_outdir)))
