예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 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)
예제 #5
0
 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
예제 #6
0
 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)