tests: unescape html to avoid differences between django versions (#74840)

This commit is contained in:
Frédéric Péters 2023-02-24 22:31:01 +01:00 committed by Gitea
parent 67afabfbd3
commit 5939cb8f18
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import datetime
import html
import os
import string
@ -1328,8 +1329,8 @@ def test_convert_as_list_with_add():
assert tmpl.render({'foo': [1, 2], 'bar': 'ab'}) == '1, 2, ab'
assert tmpl.render({'foo': 12, 'bar': ['a', 'b']}) == '12, a, b'
assert tmpl.render({'foo': 12, 'bar': 'ab'}) == '12, ab'
assert tmpl.render({'foo': [1, 2], 'bar': {'a': 'b'}}) == '1, 2, {'a': 'b'}'
assert tmpl.render({'foo': {'a': 'b'}, 'bar': ['a', 'b']}) == '{'a': 'b'}, a, b'
assert html.unescape(tmpl.render({'foo': [1, 2], 'bar': {'a': 'b'}})) == "1, 2, {'a': 'b'}"
assert html.unescape(tmpl.render({'foo': {'a': 'b'}, 'bar': ['a', 'b']})) == "{'a': 'b'}, a, b"
def test_adjust_to_week_monday(pub):