Skip to content

Commit

Permalink
Merge pull request #348 from openzim/assert_zim_entries
Browse files Browse the repository at this point in the history
Add test checking that expected entries are present
  • Loading branch information
benoit74 authored Aug 7, 2024
2 parents 4c35836 + f756c2c commit 751e104
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add `--custom-behaviors` argument to support path/HTTP(S) URL custom behaviors to pass to the crawler (#313)

### Changed

- Make it clear that `--profile` argument can be an HTTP(S) URL (and not only a path) (#288)
- Add `--custom-behaviors` argument to support path/HTTP(S) URL custom behaviors to pass to the crawler (#313)
- Fix README imprecisions + add back warc2zim availability in docker image (#314)
- Enhance integration test to assert final content of the ZIM (#287)

## [2.0.6] - 2024-08-02

Expand Down
18 changes: 18 additions & 0 deletions tests-integration/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 751e104

Please sign in to comment.