def collect(self): ''' Collects the files into the STATIC_PREPROCESSOR_ROOT directory. ''' if self.clear: self.clear_dir('') found_files = SortedDict() for finder in finders.get_finders(): for path, storage in finder.list([]): # Prefix the relative path if the source storage contains it if getattr(storage, 'prefix', None): prefixed_path = os.path.join(storage.prefix, path) else: prefixed_path = path if prefixed_path not in found_files: found_files[prefixed_path] = (storage, path) self.copy_file(path, prefixed_path, storage) return self.copied_files
def test_not_a_finder(self): with self.assertRaises(ImproperlyConfigured): list(get_finders())
def test_wrong_module(self): with self.assertRaises(ImproperlyConfigured): list(get_finders())