def test_preview_targz(self): with open(TARGZ_FILE) as f: result = utils.preview_archive_content(f, 'application/x-gzip') # the sample.tar.gz file contains... ok_('south-africa-flag.jpeg' in result) # and it's 69183 bytes ok_('69183' in result)
def test_preview_zip(self): with open(ZIP_FILE) as f: result = utils.preview_archive_content(f, 'application/zip') # the sample.zip file contains... ok_('south-africa-flag.jpeg' in result) # and it's 69183 bytes ok_('69183' in result)
def test_preview_zip(self): with open(ZIP_FILE) as f: result = utils.preview_archive_content(f, 'foo.zip') # the sample.zip file contains... ok_('south-africa-flag.jpeg' in result) # and it's 69183 bytes ok_('69183' in result)
def test_preview_targz(self): with open(TARGZ_FILE) as f: result = utils.preview_archive_content(f, 'foo.tar.gz') # the sample.tar.gz file contains... ok_('south-africa-flag.jpeg' in result) # and it's 69183 bytes ok_('69183' in result)
def test_preview_tgz(self): with open(TGZ_FILE) as f: result = utils.preview_archive_content(f, 'foo.tgz') # the sample.tgz file contains... assert 'south-africa-flag.jpeg' in result # and it's 69183 bytes assert '69183' in result
def test_preview_tgz(self): with open(TGZ_FILE) as f: result = utils.preview_archive_content(f, 'foo.tgz') # the sample.tgz file contains... ok_('south-africa-flag.jpeg' in result) # and it's 69183 bytes ok_('69183' in result)