diff --git a/tests/assets/execute_post_action_entity_script_test/script.py b/tests/assets/execute_post_action_entity_script_test/script.py index bb9d6d3..5599c3a 100755 --- a/tests/assets/execute_post_action_entity_script_test/script.py +++ b/tests/assets/execute_post_action_entity_script_test/script.py @@ -5,7 +5,7 @@ import json import tempfile -temp_dir = tempfile.gettempdir() +temp_dir = "/tmp" output_file_path = os.path.join(temp_dir, "execute_post_action_entity_script.dat") http_response_body = sys.argv[3] diff --git a/tests/islandora_tests.py b/tests/islandora_tests.py index 18838a2..f2b6265 100644 --- a/tests/islandora_tests.py +++ b/tests/islandora_tests.py @@ -129,7 +129,7 @@ def setUp(self): self.nids = list() self.output_lines = "" - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_create(self): create_output = subprocess.check_output(self.create_cmd) @@ -203,7 +203,7 @@ def setUp(self): ) self.update_cmd = ["./workbench", "--config", self.update_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_create(self): requests.packages.urllib3.disable_warnings() @@ -298,7 +298,7 @@ def setUp(self): ) self.create_cmd = ["./workbench", "--config", self.config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" parser = argparse.ArgumentParser() parser.add_argument("--config") @@ -365,7 +365,7 @@ def setUp(self): ) self.create_cmd = ["./workbench", "--config", create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nid_file = os.path.join(self.temp_dir, "workbenchdeletetesttnids.txt") nids = list() @@ -409,7 +409,7 @@ def setUp(self): ) self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nid_file = os.path.join(self.temp_dir, "workbenchupdatetestnids.txt") self.update_metadata_file = os.path.join( self.current_dir, "assets", "update_test", "workbenchupdatetest.csv" @@ -506,7 +506,7 @@ def setUp(self): config[k] = v self.islandora_host = config["host"] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nid_file = os.path.join( self.temp_dir, "workbenchcreatenonlatintestnids.txt" ) @@ -594,7 +594,7 @@ def setUp(self): self.islandora_host = config["host"] self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_secondary_task(self): requests.packages.urllib3.disable_warnings() @@ -698,7 +698,7 @@ def setUp(self): self.islandora_host = config["host"] self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_secondary_task_with_google_sheet(self): requests.packages.urllib3.disable_warnings() @@ -796,7 +796,7 @@ def setUp(self): self.islandora_host = config["host"] self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_secondary_task_with_excel(self): requests.packages.urllib3.disable_warnings() @@ -899,7 +899,7 @@ def setUp(self): create_output = subprocess.check_output(self.create_cmd) create_output = create_output.decode().strip() - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.rollback_file_path = os.path.join( self.current_dir, "assets", "additional_files_test", "rollback.csv" @@ -1019,7 +1019,7 @@ def setUp(self): self.rollback_file_path = os.path.join( self.current_dir, "assets", "allow_missing_files_test", "rollback.csv" ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nids = list() yaml = YAML() @@ -1109,7 +1109,7 @@ def setUp(self): self.rollback_file_path = os.path.join( self.current_dir, "assets", "allow_missing_files_test", "rollback.csv" ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nids = list() yaml = YAML() @@ -1225,7 +1225,7 @@ def setUp(self): "allow_missing_files_test", "add_media_additional_files_allow_missing_files_false.log", ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nids = list() yaml = YAML() @@ -1393,7 +1393,7 @@ def setUp(self): "allow_missing_files_test", "add_media_additional_files_allow_missing_files_true.log", ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nids = list() yaml = YAML() @@ -1547,7 +1547,7 @@ def setUp(self): self.islandora_host = config["host"] self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_secondary_task(self): requests.packages.urllib3.disable_warnings() diff --git a/tests/islandora_tests_check.py b/tests/islandora_tests_check.py index 8c57ee5..bcbe046 100644 --- a/tests/islandora_tests_check.py +++ b/tests/islandora_tests_check.py @@ -87,7 +87,7 @@ def setUp(self): config_file_path = os.path.join( self.current_dir, "assets", "check_test", "update.yml" ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" cmd = ["./workbench", "--config", config_file_path, "--check"] output = subprocess.check_output(cmd) @@ -113,7 +113,7 @@ def setUp(self): config_file_path = os.path.join( self.current_dir, "assets", "check_test", "delete.yml" ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" cmd = ["./workbench", "--config", config_file_path, "--check"] output = subprocess.check_output(cmd) @@ -139,7 +139,7 @@ def setUp(self): config_file_path = os.path.join( self.current_dir, "assets", "check_test", "add_media.yml" ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" cmd = ["./workbench", "--config", config_file_path, "--check"] output = subprocess.check_output(cmd) @@ -165,7 +165,7 @@ def setUp(self): config_file_path = os.path.join( self.current_dir, "assets", "max_node_title_length_test", "create.yml" ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" cmd = ["./workbench", "--config", config_file_path, "--check"] output = subprocess.check_output(cmd) @@ -225,7 +225,7 @@ def setUp(self): "--check", ] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_for_too_long_titles(self): create_output = subprocess.check_output(self.create_cmd) @@ -311,7 +311,7 @@ def tearDown(self): class TestTypedRelationBadRelatorCheck(unittest.TestCase): def setUp(self): - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_bad_relator_check_fail(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) @@ -351,7 +351,7 @@ def tearDown(self): class TestTypedRelationBadUriCheck(unittest.TestCase): def setUp(self): - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_bad_uri_check_fail(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) @@ -397,7 +397,7 @@ def setUp(self): cmd = ["./workbench", "--config", config_file_path, "--check"] output = subprocess.check_output(cmd) self.output = output.decode().strip() - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_new_typed_relation_check(self): self.assertRegex(self.output, "new terms will be created as noted", "") @@ -423,7 +423,7 @@ def tearDown(self): class TestTypedRelationNoNamespaceCheck(unittest.TestCase): def setUp(self): - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_no_namespace_check_fail(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) @@ -466,7 +466,7 @@ def setUp(self): cmd = ["./workbench", "--config", config_file_path, "--check"] output = subprocess.check_output(cmd) self.output = output.decode().strip() - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_delimiter_check(self): self.assertRegex(self.output, "input data appear to be valid", "") @@ -482,7 +482,7 @@ def tearDown(self): class TestGeolocationCheck(unittest.TestCase): def setUp(self): - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_geolocation_check(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) @@ -508,7 +508,7 @@ def tearDown(self): class TestHeaderColumnMismatchCheck(unittest.TestCase): def setUp(self): - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_header_column_mismatch_fail(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) @@ -547,7 +547,7 @@ def setUp(self): cmd = ["./workbench", "--config", config_file_path, "--check"] output = subprocess.check_output(cmd) self.output = output.decode().strip() - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_create_with_field_templates_check(self): self.assertRegex( @@ -565,7 +565,7 @@ class TestCommentedCsvs(unittest.TestCase): def test_commented_csv(self): current_dir = os.path.dirname(os.path.abspath(__file__)) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" config_file_path = os.path.join( current_dir, "assets", "commented_csvs_test", "raw_csv.yml" @@ -636,7 +636,7 @@ def setUp(self): self.create_cmd = ["./workbench", "--config", self.taxonomies_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nids = list() nids = list() @@ -774,7 +774,7 @@ def tearDown(self): class TestGoogleGid(unittest.TestCase): def setUp(self): - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_google_gid(self): current_dir = os.path.dirname(os.path.abspath(__file__)) @@ -826,7 +826,7 @@ class TestParentsPrecedeChildren(unittest.TestCase): def setUp(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_good_csv(self): config_file_path = os.path.join( @@ -860,7 +860,7 @@ class TestCreateAllowMissingFiles(unittest.TestCase): def setUp(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.false_log_file_path = os.path.join( self.current_dir, "assets", @@ -978,7 +978,7 @@ class TestCreateAllowMissingFilesWithAdditionalFiles(unittest.TestCase): def setUp(self): self.current_dir = os.path.dirname(os.path.abspath(__file__)) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.false_log_file_path = os.path.join( self.current_dir, "assets", @@ -1153,7 +1153,7 @@ def setUp(self): self.add_media_csv_file_path = os.path.join( self.current_dir, "assets", "allow_missing_files_test", "add_media.csv" ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nids = list() yaml = YAML() @@ -1381,7 +1381,7 @@ def setUp(self): "allow_missing_files_test", "add_media_additional_files.csv", ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.nids = list() yaml = YAML() @@ -1575,7 +1575,7 @@ def setUp(self): "csv_row_filters_test", "csv_row_filters_test.yml", ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.preprocessed_csv_file_path = os.path.join( self.temp_dir, "csv_row_filters_test.csv.preprocessed" ) diff --git a/tests/islandora_tests_hooks.py b/tests/islandora_tests_hooks.py index 7e66465..7c76e6f 100644 --- a/tests/islandora_tests_hooks.py +++ b/tests/islandora_tests_hooks.py @@ -78,7 +78,7 @@ def setUp(self): "execute_post_action_entity_script_test", "script.py", ) - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" self.output_file_path = os.path.join( self.temp_dir, "execute_post_action_entity_script.dat" ) diff --git a/tests/islandora_tests_paged_content.py b/tests/islandora_tests_paged_content.py index e06cf47..9e0154c 100644 --- a/tests/islandora_tests_paged_content.py +++ b/tests/islandora_tests_paged_content.py @@ -39,7 +39,7 @@ def setUp(self): self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_create_paged_content(self): requests.packages.urllib3.disable_warnings() @@ -124,7 +124,7 @@ def setUp(self): self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_create_paged_content_from_directories(self): requests.packages.urllib3.disable_warnings() @@ -233,7 +233,7 @@ def setUp(self): self.create_cmd = ["./workbench", "--config", self.create_config_file_path] - self.temp_dir = tempfile.gettempdir() + self.temp_dir = "/tmp" def test_create_paged_content_from_directories(self): requests.packages.urllib3.disable_warnings()