Skip to content
Snippets Groups Projects
Verified Commit 47488833 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: filestorage refactoring

parent 7506c59c
Branches
No related tags found
2 merge requests!50Draft: ENH: file system: core,!8Draft: F filesystem
Pipeline #30972 passed
......@@ -675,7 +675,6 @@ def test_insert_files_in_dir_regex():
pass
@mark.xfail(reason="Needs file system refactoring")
def test_auto_create_parent_dirs():
file_ = models.File(name="TestFile",
path="A/B/C/test.dat",
......@@ -756,61 +755,6 @@ def test_auto_create_parent_dirs():
assert file_1.get("url")[-26:] == "/FileSystem/A/B/C/test.dat"
@mark.xfail(reason="Needs file system refactoring")
def test_import_file():
path = get_config().get("IntegrationTests",
"test_files.test_import_files_in_dir.local") + "testfolder/"
try:
os.makedirs(path)
os.makedirs(path + "subfolder/")
with open(path + "subfolder/some_data.csv", "w") as test_file1:
test_file1.write("hello, world\n")
file_ = db.File(description="Testfile Desc",
import_file=True,
path="subfolder/some_data.csv")
file_.insert()
file_ = db.File(description="Testfile Desc",
import_file=True,
path="subfolder/some_data.csv")
file_.insert()
file_.delete()
finally:
# we need to delete this one manually, bc file_.delete() will not
# delete the file
try:
shutil.rmtree(path)
except BaseException:
pass
@mark.xfail(reason="Needs file system refactoring")
def test_import_directoy():
path = get_config().get("IntegrationTests",
"test_files.test_import_files_in_dir.local") + "testfolder/"
try:
os.makedirs(path)
os.makedirs(path + "subfolder/")
with open(path + "subfolder/some_data.csv", "w") as test_file1:
test_file1.write("hello, world\n")
c = models.Container()
finally:
try:
c.delete()
except BaseException:
pass
try:
shutil.rmtree(path)
except BaseException:
pass
@mark.xfail(reason="Needs file system refactoring")
def test_consistency_file_was_modified_2():
# this test is different from test_consistency_file_was_modified in that
# the server does actually corrupt the file.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment