Skip to content

Commit 0ce79c1

Browse files
committed
Fix test
1 parent ec8aaaf commit 0ce79c1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

osf_tests/test_archiver.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -558,10 +558,12 @@ def test_archive_success(self):
558558
continue
559559
for file_response in response_block.response:
560560
file_sha = file_response['file_hashes']['sha256']
561-
originating_node = Guid.objects.get(_id=node_index[file_sha]).referent
562-
parent_registration = originating_node.registrations.get()
563-
assert originating_node._id not in file_response['file_urls']['html']
564-
assert parent_registration._id in file_response['file_urls']['html']
561+
if file_sha in node_index:
562+
originating_node = Guid.objects.get(_id=node_index[file_sha]).referent
563+
parent_registration = originating_node.registrations.get()
564+
assert originating_node._id not in file_response['file_urls']['html']
565+
assert parent_registration._id in file_response['file_urls']['html']
566+
565567
registration_files.add(file_sha)
566568

567569
assert registration_files == set(selected_files.keys())

0 commit comments

Comments
 (0)