diff --git a/.travis.yml b/.travis.yml index 24f4a60b..5f678959 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,10 @@ python: - "3.6" - "3.7" # command to install dependencies +addons: + apt: + packages: + - clamav-daemon install: - pip install tox-travis coveralls # command to run tests @@ -16,7 +20,7 @@ notifications: after_script: - coveralls matrix: - allow_failures: - - python: "3.5" - - python: "3.6" - - python: "3.7" + allow_failures: + - python: "3.5" + - python: "3.6" + - python: "3.7" diff --git a/tests/test_clamav.py b/tests/test_clamav.py index 9fe339c8..82b51c82 100644 --- a/tests/test_clamav.py +++ b/tests/test_clamav.py @@ -51,6 +51,10 @@ class TestClamav (unittest.TestCase): 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAW0NMQU1BVl' \ '0AEAAAABAAAAACAAABAAAAAAAAAAAAAAAAAAAAAAAAwA==">t' infected, errors = clamav.scan(data, self.clamav_conf) - msg = 'stream: ClamAV-Test-File(2d1206194bd704385e37000be6113f73:781) FOUND\n' - self.assertTrue(msg in infected) + # different versions of clamav report different responses, apparently + acceptable_responses = ( + ['stream: ClamAV-Test-File(2d1206194bd704385e37000be6113f73:781) FOUND\n'], + ['stream: Clamav.Test.File-6(aa15bcf478d165efd2065190eb473bcb:544) FOUND\n'], + ) + self.assertIn(infected, acceptable_responses) self.assertFalse(errors)