mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-27 15:24:00 +00:00
Enable clamav integration tests on Travis CI
This commit is contained in:
parent
bbb90eba81
commit
7e94e542b3
2 changed files with 14 additions and 6 deletions
12
.travis.yml
12
.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"
|
||||
|
|
|
|||
|
|
@ -51,6 +51,10 @@ class TestClamav (unittest.TestCase):
|
|||
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAW0NMQU1BVl' \
|
||||
'0AEAAAABAAAAACAAABAAAAAAAAAAAAAAAAAAAAAAAAwA==">t</a>'
|
||||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue