diff --git a/perma_web/api/tests/test_link_resource.py b/perma_web/api/tests/test_link_resource.py index 7d48d26a0..6c2c4e386 100644 --- a/perma_web/api/tests/test_link_resource.py +++ b/perma_web/api/tests/test_link_resource.py @@ -94,7 +94,7 @@ def setUp(self): 'private_reason', ] - def assertRecordsInArchive(self, link, upload=False, expected_records=None, check_screenshot=False, check_provenance_summary=False, filetype='wacz'): + def assertRecordsInArchive(self, link, upload=False, expected_records=None, check_screenshot=False, check_provenance_summary=False): def find_recording_in_warc(index, capture_url, content_type): warc_content_type = "application/http; msgtype=response" @@ -129,8 +129,7 @@ def find_attachment_in_warc(index, capture_url): self.assertTrue(link.primary_capture.content_type, "Capture is missing a content type.") # create an index of the warc - extract = filetype == 'wacz' - with link.get_warc(extract) as warc_file: + with link.get_warc() as warc_file: index = index_warc_file(warc_file) # see if the index reports the content is in the warc @@ -655,7 +654,7 @@ def test_should_create_archive_from_pdf_file(self): user=self.org_user) link = Link.objects.get(guid=obj['guid']) - self.assertRecordsInArchive(link, upload=True, filetype='wacz') + self.assertRecordsInArchive(link, upload=True) self.assertEqual(link.primary_capture.user_upload, True) def test_should_create_archive_from_jpg_file(self): @@ -666,7 +665,7 @@ def test_should_create_archive_from_jpg_file(self): user=self.org_user) link = Link.objects.get(guid=obj['guid']) - self.assertRecordsInArchive(link, upload=True, filetype='wacz') + self.assertRecordsInArchive(link, upload=True) self.assertEqual(link.primary_capture.user_upload, True) def test_should_reject_jpg_file_with_invalid_url(self): @@ -687,7 +686,7 @@ def test_should_should_create_archive_from_jpg_file_with_nonloading_url(self): link = Link.objects.get(guid=obj['guid']) self.assertEqual(link.submitted_url, 'http://asdf.asdf') - self.assertRecordsInArchive(link, upload=True, filetype='wacz') + self.assertRecordsInArchive(link, upload=True) self.assertEqual(link.primary_capture.user_upload, True) def test_should_reject_invalid_file(self):