From 538b10a7564703df9abf250dd60afe383f2a4f7c Mon Sep 17 00:00:00 2001 From: Mark Jordan Date: Mon, 23 Sep 2024 08:14:05 -0700 Subject: [PATCH] Resolves #826. --- tests/islandora_tests.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/islandora_tests.py b/tests/islandora_tests.py index 1c1724f..badee46 100644 --- a/tests/islandora_tests.py +++ b/tests/islandora_tests.py @@ -905,12 +905,9 @@ def setUp(self): self.rollback_file_path = os.path.join( self.current_dir, "assets", "additional_files_test", "rollback.csv" ) - with open(self.rollback_file_path, "r") as rbf: - rollback_file_contents = rbf.read() - # There will only be one nid in the rollback.csv file. - nid = rollback_file_contents.replace("node_id", "") - self.nid = nid.strip() + with open(self.rollback_file_path, "r") as rbf: + self.nid = rbf.readlines()[-1].strip() media_list_url = ( self.islandora_host + "/node/" + self.nid + "/media?_format=json" @@ -920,6 +917,7 @@ def setUp(self): auth=(self.islandora_username, self.islandora_password), verify=False, ) + media_list_json = json.loads(media_list_response.text) self.media_sizes = dict() self.media_use_tids = dict()