Browse Source

fix another test

pull/519/head
Simon Conseil 1 year ago
parent
commit
536f658abb
  1. 9
      tests/test_zip.py

9
tests/test_zip.py

@ -24,16 +24,11 @@ def test_zipped_correctly(tmpdir):
gallery = make_gallery(destination=outpath, zip_gallery="archive.zip") gallery = make_gallery(destination=outpath, zip_gallery="archive.zip")
gallery.build() gallery.build()
zipf = os.path.join(outpath, "test1", "archive.zip") zipf = os.path.join(outpath, "test2", "archive.zip")
assert os.path.isfile(zipf) assert os.path.isfile(zipf)
zip_file = zipfile.ZipFile(zipf, "r") zip_file = zipfile.ZipFile(zipf, "r")
expected = ( expected = ("21.tiff", "22.jpg", "CMB_Timeline300_no_WMAP.jpg")
"11.jpg",
"CMB_Timeline300_no_WMAP.jpg",
"flickr_jerquiaga_2394751088_cc-by-nc.jpg",
"example.gif",
)
for filename in zip_file.namelist(): for filename in zip_file.namelist():
assert filename in expected assert filename in expected

Loading…
Cancel
Save