Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/moin/apps/frontend/_tests/test_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ def _test_view(
assert rv.headers["Content-Type"] in content_types
if method == "GET":
for item in data:
if item == "<!doctype html": # TODO: remove workaround when Werkzeug >= 2.1.2 is set
assert item in str(rv_data).lower()
else:
assert item in rv_data
assert item in rv_data
return rv

def _test_view_post(
Expand Down
3 changes: 1 addition & 2 deletions src/moin/apps/serve/_tests/test_serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ def test_files(self, app):
rv = c.get(url_for("serve.files", name="DoesntExist"))
assert rv.status == "404 NOT FOUND"
assert rv.headers["Content-Type"] == "text/html; charset=utf-8"
# TODO: remove workaround when Werkzeug >= 2.1.2 is set (PR 1325)
assert "<!doctype html" in str(rv.data).lower()
assert rv.text.startswith("<!doctype html")
7 changes: 1 addition & 6 deletions src/moin/utils/_tests/test_interwiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import tempfile
import os.path
import shutil
import re

import pytest
from flask import current_app as app
Expand Down Expand Up @@ -101,11 +100,7 @@ def test_url_for_item(self):
]

for (item_name, wiki_name, field, namespace, rev, endpoint, _external), url in tests:
# Workaround: substitute %40 with @ to allow both Werkzeug versions 2.2 and 2.3. TODO: remove later
assert (
re.sub("%40", "@", url_for_item(item_name, wiki_name, field, namespace, rev, endpoint, _external))
== url
)
assert url_for_item(item_name, wiki_name, field, namespace, rev, endpoint, _external) == url

def test__split_namespace(self):
map = set()
Expand Down