From 48103f8e02da2a4c4a4893743b9ee2e0ace19149 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Fri, 19 Jul 2024 15:10:12 +0000 Subject: [PATCH] Add test checking that expected entries are present --- tests-integration/integration.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests-integration/integration.py b/tests-integration/integration.py index 9550386..c314167 100644 --- a/tests-integration/integration.py +++ b/tests-integration/integration.py @@ -31,6 +31,24 @@ def test_zim_scraper(): assert "Browsertrix crawler " in scraper +def test_files_list(): + """Check that expected files are present in the ZIM at proper path""" + zim_fh = Archive("/output/isago.zim") + for expected_entry in [ + "_zim_static/__wb_module_decl.js", + "_zim_static/wombat.js", + "_zim_static/wombatSetup.js", + "isago.rskg.org/", + "isago.rskg.org/a-propos", + "isago.rskg.org/conseils", + "isago.rskg.org/faq", + "isago.rskg.org/static/favicon256.png", + "isago.rskg.org/static/tarifs-isago.pdf", + "maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css", + ]: + assert zim_fh.get_content(expected_entry) + + def test_user_agent(): """Test that mobile user agent was used