Skip to content

Commit b3bdd4e

Browse files
committed
Change fixture to adapt to wikimedia blocking Github Actions
1 parent b5db325 commit b3bdd4e

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ def timeout_url() -> str:
6464

6565
@pytest.fixture(scope="module")
6666
def png_image_url() -> str:
67-
return "https://commons.wikimedia.org/static/images/project-logos/commonswiki.png"
67+
return "https://farm.openzim.org/assets/favicon-96x96.png"
6868

6969

7070
@pytest.fixture(scope="module")
7171
def gzip_html_url() -> str:
72-
return "https://en.wikipedia.org/wiki/Main_Page"
72+
return "https://kiwix.org/en"
7373

7474

7575
@pytest.fixture(scope="module")

tests/rewriting/test_html_rewriting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ def test_rewrite_base_href(rewrite_base_href_content: ContentForTests):
789789
),
790790
pytest.param(
791791
"""<img src="image.png?param1=value1&param2=value2">""",
792-
"""<img src="image.png%3Fparam1%3Dvalue1%C2%B6m2%3Dvalue2">""",
792+
"""<img src="image.png%3Fparam1%3Dvalue1&param2%3Dvalue2">""",
793793
id="badly_escaped_src",
794794
),
795795
],

tests/zim/test_zim_creator.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def test_urlitem_html(tmp_path: pathlib.Path, gzip_html_url: str):
331331
creator.add_item(URLItem(url=gzip_html_url))
332332

333333
zim = Archive(fpath)
334-
assert bytes(zim.get_item("wiki/Main_Page").content) == file_bytes
334+
assert bytes(zim.get_item("en").content) == file_bytes
335335

336336

337337
def test_urlitem_nonhtmlgzip(tmp_path: pathlib.Path, gzip_nonhtml_url: str):
@@ -362,10 +362,7 @@ def test_urlitem_binary(tmp_path: pathlib.Path, png_image_url: str):
362362
creator.add_item(URLItem(url=png_image_url))
363363

364364
zim = Archive(fpath)
365-
assert (
366-
bytes(zim.get_item("static/images/project-logos/commonswiki.png").content)
367-
== file_bytes
368-
)
365+
assert bytes(zim.get_item("assets/favicon-96x96.png").content) == file_bytes
369366

370367

371368
def test_urlitem_staticcontent(tmp_path: pathlib.Path, gzip_nonhtml_url: str):

0 commit comments

Comments
 (0)