a0dd4d738c
The result of the encoded (i.e., escaped) text in HTML changed
between Django pre-3.0 and 3.0+. For example, decimal and hex encoding
are semantically same but they are different in literal texts.
While I don't know what triggers this change, I think it makes sense
to compare these texts after decoding as HTML.
Considering this, html=True is passed to self.assertContains().
When passing html=True, a text in an HTML element is not compared
partially and a full text as a value of the HTML element is compared,
so we need to pass the full text of an HTML element value now.
I believe the above change is caused by the change that django.test.html.Parser
is initialized with convert_charrefs=False previously. On the other hand,
it is not specified now in Django 3.0+ [1]. This leads to the situation that
escapes on unicode characters are handled differently.
[1]
|
||
---|---|---|
.. | ||
templates/instances | ||
workflows | ||
__init__.py | ||
audit_tables.py | ||
console.py | ||
forms.py | ||
interfaces_tables.py | ||
panel.py | ||
tables.py | ||
tabs.py | ||
tests.py | ||
urls.py | ||
utils.py | ||
views.py |