hoover / snoop

Other
6 stars 3 forks source link

Test failure on Linux because of different magic output #40

Open mgax opened 7 years ago

mgax commented 7 years ago

The test test_digest_magic_file_types in testsuite/test_digest.py fails for the file no-extension/file_msg:

>       assert data['type'] == expected_type
E       AssertionError: assert None == 'email'

The test does work on Mac Os Sierra. The difference seems to be in the return value of calls to magic in snoop/content_types.py - libmagic_guess_content_type. On Mac, magic.from_buffer(buffer, mime=True) returns 'application/vnd.ms-outlook', but on Linux it returns 'application/CDFV2-encrypted'.

Edit: the Linux failure was observed while running the test suite with Docker. All other tests pass.