Esempio n. 1
0
    def test_directory_operations(self):
# create and change to a temp directory (so we don't clobber anything)
        tmpdir = test_helpers.file_unused(browser)
        test_helpers.create_directory(self, browser, tmpdir)
        test_helpers.change_directory(self, browser, tmpdir)
# TEST - rename dir with funny chars
        for item in list:
            test_helpers.create_directory(self, browser, item)
            test_helpers.rename(self, browser, item, "something_new")
            test_helpers.rename(self, browser, "something_new", item)
            test_helpers.delete_directory(self, browser, item)
# cleanup
        test_helpers.navigate_home(self, browser)
        test_helpers.delete_directory(self, browser, tmpdir)
Esempio n. 2
0
    def test_multiple_files(self):
        tmpdir = test_helpers.file_unused(browser)
        test_helpers.create_directory(self, browser, tmpdir)
        test_helpers.change_directory(self, browser, tmpdir)
        test_helpers.file_upload(self, browser, upload)
        base = prev = os.path.basename(upload)
        test_helpers.create_directory(self, browser, "multi_100")
        for i in range(1, 100):
            name = base + "_" + str(i)
            test_helpers.rename(self, browser, prev, name)
            test_helpers.file_copy_to_directory(self, browser, name, "multi_100")
            prev = name
# go into the directory and select all - delete - assert dont exist
        test_helpers.change_directory(self, browser, "multi_100")
        test_helpers.delete_all(self, browser)
# cleanup
        test_helpers.navigate_home(self, browser)
        test_helpers.delete_directory(self, browser, tmpdir)
Esempio n. 3
0
    def test_file_operations(self):
# create and change to a temp directory (so we don't clobber anything)
        tmpdir = test_helpers.file_unused(browser)
        test_helpers.create_directory(self, browser, tmpdir)
        test_helpers.change_directory(self, browser, tmpdir)
# upload our file
        test_helpers.file_upload(self, browser, upload)
# copy file into directory
        test_helpers.create_directory(self, browser, "testdir")
        name = os.path.basename(upload)
# create copies in tmpdir with our list of odd names
        for item in list:
            test_helpers.rename(self, browser, name, item)
            test_helpers.file_copy_to_directory(self, browser, item, "testdir")
            test_helpers.rename(self, browser, item, name)
# check the copy worked, then delete
        test_helpers.change_directory(self, browser, "testdir")
        for item in list:
            test_helpers.delete_file(self, browser, item)
# cleanup
        test_helpers.navigate_home(self, browser)
        test_helpers.delete_directory(self, browser, tmpdir)