Add tests for nested compression
Why: * To ensure we don't try and unrar a rar.gz file. This change addresses the need by: * Adds test file archive.rar.gz * Add mime check to ensure we get the mime of gzip, not rar.
This commit is contained in:
parent
03018b4e5b
commit
eadc156170
Binary file not shown.
Binary file not shown.
|
@ -150,6 +150,12 @@ class TestMime (unittest.TestCase):
|
|||
self.mime_test_file("t.tar.bz2.foo", "application/x-tar", "bzip2")
|
||||
self.mime_test_file("t.tbz2.foo", "application/x-tar", "bzip2")
|
||||
|
||||
@needs_program('file')
|
||||
def test_nested_gzip (self):
|
||||
# Ensure that a file that doesn't natively support encoding does not see the encoding
|
||||
self.mime_test_file("t.rar.gz", "application/gzip")
|
||||
self.mime_test_file("t.rar.gz.foo", "application/gzip")
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program('gzip')
|
||||
def test_mime_file_gzip (self):
|
||||
|
|
Loading…
Reference in New Issue