Example #1
0
    def testCompressedFileAlreadyExists(self):
        """
        Testeo de una carpeta con archivos comprimidos que tienen el mismo nombre que una carpeta.

        :return: void
        :rtype: None
        """
        self.fm.disable_extract_if_folder_already_exists()
        if VERBOSE:
            print_bars_console("Testeo carpeta con archivos comprimidos que ya existen como carpetas")
            print self.fm.inspect_single_file("Folder 8-COMPSD")
        t = ['Folder 8-COMPSD/Subfolder 1/Content 1.txt', \
             'Folder 8-COMPSD/Subfolder 1/Content 2.txt', \
             'Folder 8-COMPSD/Subfolder 1/Subfolder inside subfolder 1/Content 1.txt', \
             'Folder 8-COMPSD/Subfolder 1/Subfolder inside subfolder 1/Content 2.txt', \
             'Folder 8-COMPSD/Zip Folder/Rar Folder/Content Y.txt', \
             'Folder 8-COMPSD/Zip Folder/Rar Folder/Content Z.txt', \
             'Folder 8-COMPSD/Zip Folder/Rar Folder/Rar Folder - target/Content target.txt', \
             'Folder 8-COMPSD/Zip Folder/Rar Folder/Rar Folder/File C.txt', \
             'Folder 8-COMPSD/Zip Folder/Rar Folder/Rar Folder/File Z.txt', \
             'Folder 8-COMPSD/Zip Folder/Rar Folder/Rar Folder/Zip Folder TARGET/Parte1.java', \
             'Folder 8-COMPSD/Zip Folder/Rar Folder/Rar Folder/Zip Folder TARGET/Parte2.java', \
             'Folder 8-COMPSD/Zip Folder/Rar Folder/Subfolder with rar/Content 1.txt', \
             'Folder 8-COMPSD/Zip Folder/Rar Folder/Subfolder with rar/Content 2.txt', \
             'Folder 8-COMPSD/Zip Folder/Rar Folder/Subfolder with rar/Rar Folder/Content 1 inside rar.txt', \
             'Folder 8-COMPSD/Zip Folder/Rar Folder/Subfolder with rar/Rar Folder/Content 2 inside rar.txt']
        assert equal_lists(t, self.fm.inspect_single_file("Folder 8-COMPSD")) is True, FILEMANAGER_ERROR_SCAN
        del t
Example #2
0
    def testArchivoInexistente(self):
        """
        Testeo de un archivo inexistente.

        :return: void
        :rtype: None
        """
        if VERBOSE:
            print_bars_console("Testeo de un archivo inexistente")
            print self.fm.inspect_single_file("Inexistente")
        assert equal_lists([], self.fm.inspect_single_file("Inexistente")) is True, FILEMANAGER_ERROR_SCAN
Example #3
0
    def testArchivoSingle(self):
        """
        Test de un archivo no carpeta.

        :return: void
        :rtype: None
        """
        if VERBOSE:
            print_bars_console("Testeo de un archivo no carpeta")
            print self.fm.inspect_single_file("ABOUT")
        assert equal_lists([], self.fm.inspect_single_file("ABOUT")), FILEMANAGER_ERROR_SCAN
Example #4
0
    def testProhibido(self):
        """
        Test de un archivo bloqueado por configuraci├│n.

        :return: void
        :rtype: None
        """
        if VERBOSE:
            print_bars_console("Testeo de archivos prohibidos")
            print self.fm.inspect_single_file("__MACOSX")
        assert equal_lists([], self.fm.inspect_single_file("__MACOSX")) is True, FILEMANAGER_ERROR_SCAN
Example #5
0
    def testCarpetaUnica(self):
        """
        Testeo de una carpeta sencilla sin subcarpetas.

        :return: void
        :rtype: None
        """
        self.fm.restore_wd()
        if VERBOSE:
            print_bars_console("Testeo de carpetas ├║nicas")
            print self.fm.inspect_single_file("Folder 1")
        t = ['Folder 1/Content 1.txt', \
             'Folder 1/Content 2.txt']
        assert equal_lists(t, self.fm.inspect_single_file("Folder 1")) is True, FILEMANAGER_ERROR_SCAN
        if VERBOSE:
            print self.fm.inspect_single_file("Folder 2")
        t = ['Folder 2/Content 1.txt', \
             'Folder 2/Content 2.txt', \
             'Folder 2/Subfolder/Content 1.txt', \
             'Folder 2/Subfolder/Content 2.txt']
        assert equal_lists(t, self.fm.inspect_single_file("Folder 2")) is True, FILEMANAGER_ERROR_SCAN
        del t
Example #6
0
    def testRar(self):
        """
        Testeo de un archivo rar.

        :return: void
        :rtype: None
        """
        if VERBOSE:
            print_bars_console("Testeo de archivo rar")
            print self.fm.inspect_single_file("Rar Folder.rar")
        t = ['Rar Folder/Content 1 inside rar.txt', 'Rar Folder/Content 2 inside rar.txt']
        assert equal_lists(t, self.fm.inspect_single_file("Rar Folder.rar")) is True, FILEMANAGER_ERROR_SCAN
        del t
Example #7
0
    def testCarpetaConRar(self):
        """
        Testeo de una carpeta con un archivo rar dentro.

        :return: void
        :rtype: None
        """
        if VERBOSE:
            print_bars_console("Testeo de una carpeta con un archivo rar dentro")
            print self.fm.inspect_single_file("Folder 3")
        t = ['Folder 3/Content 1.txt', \
             'Folder 3/Content 2.txt', \
             'Folder 3/Rar Folder/Content 1 inside rar.txt', \
             'Folder 3/Rar Folder/Content 2 inside rar.txt', \
             'Folder 3/Subfolder with rar/Content 1.txt', \
             'Folder 3/Subfolder with rar/Content 2.txt', \
             'Folder 3/Subfolder with rar/Rar Folder/Content 1 inside rar.txt', \
             'Folder 3/Subfolder with rar/Rar Folder/Content 2 inside rar.txt']
        assert equal_lists(t, self.fm.inspect_single_file("Folder 3")) is True, FILEMANAGER_ERROR_SCAN
        del t
Example #8
0
    def testZipConCarpeta(self):
        """
        Testeo de un archivo zip con una carpeta dentro.

        :return: void
        :rtype: None
        """
        if VERBOSE:
            print_bars_console("Testeo de una carpeta con un archivo zip dentro")
            print self.fm.inspect_single_file("Folder 4")
        t = ['Folder 4/Content 1.txt', \
             'Folder 4/Content 2.txt', \
             'Folder 4/Subfolder 1/Content 1.txt', \
             'Folder 4/Subfolder 1/Content 2.txt', \
             'Folder 4/Subfolder with zip/Content 1.txt', \
             'Folder 4/Subfolder with zip/Content 2.txt', \
             'Folder 4/Subfolder with zip/Zip Folder/Content 1 inside zip.txt', \
             'Folder 4/Subfolder with zip/Zip Folder/Content 2 inside zip.txt', \
             'Folder 4/Zip Folder/Content 1 inside zip.txt', \
             'Folder 4/Zip Folder/Content 2 inside zip.txt']
        assert equal_lists(t, self.fm.inspect_single_file("Folder 4")) is True, FILEMANAGER_ERROR_SCAN
        del t
Example #9
0
    def testFolder5(self):
        """
        Testeo de una carpeta grande.

        :return: void
        :rtype: None
        """
        if VERBOSE:
            print_bars_console("Testeo Folder 5")
            print self.fm.inspect_single_file("Folder 5")
        t = ['Folder 5/Content 1.txt', \
             'Folder 5/Content 2.txt', \
             'Folder 5/Subfolder 1/Content 3.txt', \
             'Folder 5/Subfolder 1/Content 4.txt', \
             'Folder 5/Subfolder 1/Folder 1 inside subfolder 1/Content 5.txt', \
             'Folder 5/Subfolder 1/Folder 2 inside subfolder 1/Content 6.txt', \
             'Folder 5/Subfolder 1/Folder 2 inside subfolder 1/Content 7.txt', \
             'Folder 5/Subfolder 1/Folder 2 inside subfolder 1/Folder 1 inside folder 2 inside subfolder 1/Content C.txt', \
             'Folder 5/Subfolder 1/Folder 2 inside subfolder 1/Folder 1 inside folder 2 inside subfolder 1/README.txt', \
             'Folder 5/Subfolder 1/Folder 2 inside subfolder 1/Folder 1 inside folder 2 inside subfolder 1/Subfolder 1/A1.txt', \
             'Folder 5/Subfolder 1/Folder 2 inside subfolder 1/Folder 1 inside folder 2 inside subfolder 1/Subfolder 1/A2.txt', \
             'Folder 5/Subfolder 1/Folder 2 inside subfolder 1/Folder 1 inside folder 2 inside subfolder 1/Subfolder with zip/Content K.txt',
             'Folder 5/Subfolder 1/Folder 2 inside subfolder 1/Folder 1 inside folder 2 inside subfolder 1/Subfolder with zip/Content X.txt', \
             'Folder 5/Subfolder 1/Folder 2 inside subfolder 1/Folder 1 inside folder 2 inside subfolder 1/Subfolder with zip/Zip Folder/main.java', \
             'Folder 5/Subfolder 1/Folder 2 inside subfolder 1/Folder 1 inside folder 2 inside subfolder 1/Subfolder with zip/Zip Folder/Parte1.java', \
             'Folder 5/Subfolder 1/Folder 2 inside subfolder 1/Folder 1 inside folder 2 inside subfolder 1/Zip Folder/Content 1 inside zip.txt', \
             'Folder 5/Subfolder 1/Folder 2 inside subfolder 1/Folder 1 inside folder 2 inside subfolder 1/Zip Folder/Content 2 inside zip.txt', \
             'Folder 5/Subfolder 2 with zip/Content 8.txt', \
             'Folder 5/Subfolder 2 with zip/Content 9.txt', \
             'Folder 5/Subfolder 2 with zip/Zip Folder inside subfolder 2/Content 10', \
             'Folder 5/Subfolder 2 with zip/Zip Folder inside subfolder 2/Content 11.java', \
             'Folder 5/Zip Folder/Content A', \
             'Folder 5/Zip Folder/Content B.jar', \
             'Folder 5/Zip Folder/Rar Folder inside Zip Folder/Content 1 inside rar.txt', \
             'Folder 5/Zip Folder/Rar Folder inside Zip Folder/Content 2 inside rar.txt']
        assert equal_lists(t, self.fm.inspect_single_file("Folder 5")) is True, FILEMANAGER_ERROR_SCAN
        del t