]> git.ipfire.org Git - thirdparty/patchwork.git/commit
tests: Fix escaping in bundle tests on Django 3.0
authorAndrew Donnellan <ajd@linux.ibm.com>
Wed, 8 Apr 2020 21:52:26 +0000 (22:52 +0100)
committerStephen Finucane <stephen@that.guru>
Wed, 8 Apr 2020 22:35:02 +0000 (23:35 +0100)
commite2471e523149d582c25a842947cf58fa6fd88703
tree5327fac30c5589a57eb6df1e420bb5f8da78ef20
parent801106e3333ec0b29a490c1442f5e85d5465f345
tests: Fix escaping in bundle tests on Django 3.0

Django 3.0 switches to using Python 3's built-in HTML escaper, which
prefers to escape entities using hex rather than decimal.

Some of our tests check rendered HTML output against pre-escaped
strings, and fail because '&#39;' is now '&#x27;'.

Fix this by using the escape function so we get consistent escaping no
matter which Django version.

Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/tests/test_bundles.py