def upload_docs(self, paths, title=None, folder_entry=None,
                    file_ext=None, **kwargs):
        doc_entries = {}
        for path in paths:
            folder_root = folder_entry
            if os.path.isdir(path):
                folder_entries = {}
                # final '/' sets folder_name to '' which causes
                # 503 "Service Unavailable".
                path = path.rstrip(os.path.sep)
                for dirpath, dirnames, filenames in os.walk(path):
                    directory = os.path.dirname(dirpath)
                    folder_name = os.path.basename(dirpath)
                    if directory in folder_entries:
                        fentry = self._create_folder(
                            folder_name, folder_entries[directory])
                    else:
                        fentry = self._create_folder(folder_name, folder_root)
                    folder_entries[dirpath] = fentry
                    LOG.debug('Created folder ' + dirpath + ' ' + folder_name)
                    for fname in filenames:
                        doc = self.upload_single_doc(os.path.join(dirpath, fname),
                                                     folder_entry=fentry)
                        if doc:
                            doc_entries[fname] = doc
            else:
                doc = self.upload_single_doc(path, title=title,
                                             folder_entry=folder_entry,
                                             file_ext=file_ext,
                                             **kwargs)
                if doc:
                    doc_entries[os.path.basename(path)] = doc
        return doc_entries
Tests the reset method.
dataset/ETHPy150Open vinitkumar/googlecl/src/googlecl/docs/base.py/DocsBaseCL.upload_docs--crossover with--dataset/ETHPy150Open Axelrod-Python/Axelrod/axelrod/tests/unit/test_qlearner.py/TestArrogantQLearner.test_reset_method