Exemple #1
0
    def test_files_sha1sum(self):

        path_list = get_file_list(self.files_dir)
        expected = {
            os.path.join(self.files_dir, "file1.txt"): "ce1be0ff4065a6e9415095c95f25f47a633cef2b",
            os.path.join(self.files_dir, "file2.txt"): "c2edf7b002d0354039a8aaba3bc53180caf3d248",
        }

        self.assertEqual(files_sha1sum(path_list), expected)
Exemple #2
0
    def test_list_files(self):
        os.chdir(self.tempdir)

        paths = ["files/file1.txt", "files/file2.txt"]

        self.assertItemsEqual(get_file_list(self.dir_name), paths)