Skip to content

Commit

Permalink
Re-enable test virus zip files that are now available again
Browse files Browse the repository at this point in the history
  • Loading branch information
asset-web committed Jul 2, 2024
1 parent 69c85c6 commit dde911b
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions tests/test_clamav.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@

BASE_DIR = os.path.dirname(__file__)
VIRUS_TXT_FILE_URL = "https://secure.eicar.org/eicar.com.txt"
# Below zip files are currently unavailable and tests are being disabled. NB: .zip uploads are not allowable.
# VIRUS_ZIP_FILE_URL = "https://secure.eicar.org/eicar_com.zip"
# VIRUS_DEEP_ZIP_FILE_URL = "https://secure.eicar.org/eicarcom2.zip"
VIRUS_ZIP_FILE_URL = "https://secure.eicar.org/eicar_com.zip"
VIRUS_DEEP_ZIP_FILE_URL = "https://secure.eicar.org/eicarcom2.zip"


@tag('clamav', 'selenium-test')
Expand Down Expand Up @@ -92,25 +91,25 @@ def test_upload_sample_b_ovid_bz_archive(self):
abstract_file_path = os.path.join(BASE_DIR, "07-32-54-exercise-inflamm-breast-cancer-may-3-2019-expanded-terms.txt.gz")
self._assert_file_upload(url=reverse("search_ovid_medline"), file_path=abstract_file_path)

# @tag('scanning')
# def test_scanning_ovid_zip_files(self):
# "Trigger virus scanner file uploads with EICAR zip with OVID upload form."
# self._assert_virus_scanning(reverse("search_ovid_medline"), VIRUS_ZIP_FILE_URL)

# @tag('scanning')
# def test_scanning_ovid_deep_zip_files(self):
# "Trigger virus scanner file uploads with EICAR deep zip with OVID upload form."
# self._assert_virus_scanning(reverse("search_ovid_medline"), VIRUS_DEEP_ZIP_FILE_URL)

# @tag('scanning')
# def test_scanning_pubmed_zip_files(self):
# "Trigger virus scanner file uploads with EICAR zip with PubMed upload form."
# self._assert_virus_scanning(reverse("search_pubmed"), VIRUS_ZIP_FILE_URL)

# @tag('scanning')
# def test_scanning_oubmed_deep_zip_files(self):
# "Trigger virus scanner file uploads with EICAR deep zip with PubMed upload form."
# self._assert_virus_scanning(reverse("search_pubmed"), VIRUS_DEEP_ZIP_FILE_URL)
@tag('scanning')
def test_scanning_ovid_zip_files(self):
"Trigger virus scanner file uploads with EICAR zip with OVID upload form."
self._assert_virus_scanning(reverse("search_ovid_medline"), VIRUS_ZIP_FILE_URL)

@tag('scanning')
def test_scanning_ovid_deep_zip_files(self):
"Trigger virus scanner file uploads with EICAR deep zip with OVID upload form."
self._assert_virus_scanning(reverse("search_ovid_medline"), VIRUS_DEEP_ZIP_FILE_URL)

@tag('scanning')
def test_scanning_pubmed_zip_files(self):
"Trigger virus scanner file uploads with EICAR zip with PubMed upload form."
self._assert_virus_scanning(reverse("search_pubmed"), VIRUS_ZIP_FILE_URL)

@tag('scanning')
def test_scanning_oubmed_deep_zip_files(self):
"Trigger virus scanner file uploads with EICAR deep zip with PubMed upload form."
self._assert_virus_scanning(reverse("search_pubmed"), VIRUS_DEEP_ZIP_FILE_URL)


class ScanOnUploadTestCase(ScanOnUploadInterface):
Expand Down

0 comments on commit dde911b

Please sign in to comment.