From 62927185fe7591c9a2596647f36f19cc6a4607ef Mon Sep 17 00:00:00 2001 From: Gyorgy Sarvari Date: Thu, 15 Jan 2026 09:29:13 +0100 Subject: python3-django: (v2.2.28) fix tests These patches are for python3-django_2.2.28 These patches only touch the tests folder, which is normally not installed. Most of these changes are backported patches, that adapt tests to modern(er) Python environment than they were written for, and some other just fix a bug in the tests that were always present. 0001-Fix-tag_strip-tests.patch: The html parser's behavior in Python has changed since 3.9, making this testcase fail. This is a partial backport of the patch, which handles only the Python version that is shipped with oe-core (The original patch handles both old and new versions) 0001-Fixed-inspectdb.tests.InspectDBTestCase.test_custom_.patch: SQLite3's behavior has changed also since the tests were written, making some testcases fail. This backported patch fixes that. 0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch: this backported patch makes a test-verification conform to html5 standard. Previously the test failed. 0001-Made-RemoteTestResultTest.test_pickle_errors_detecti.patch: This backported patch once again adapts a test to an evolved library. tblib's behavior has changed in a way that the tests couldn't pickle the exceptions from the library, and the tests that verify exceptions were failing due to this. 0001-fix-quote-type-in-expected-error-message.patch: This is not a backported patch. Error messages are localized, and a test verifies an error message that contains a quote. The test expects double quotes, but the default locale used with the testimage is using single quotes. Since the test and the expected error message are correct otherwise, just changed this expected quote in the test. Signed-off-by: Gyorgy Sarvari --- ...utils.tests.HTMLEqualTests.test_parsing_e.patch | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-django/0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch (limited to 'meta-python/recipes-devtools/python/python3-django/0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch') diff --git a/meta-python/recipes-devtools/python/python3-django/0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch b/meta-python/recipes-devtools/python/python3-django/0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch new file mode 100644 index 0000000000..a84a118bcb --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-django/0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch @@ -0,0 +1,32 @@ +From 744927154e6748db08f5232de78ee0d4a8be61a5 Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari +Date: Mon, 21 Jul 2025 15:23:32 -0300 +Subject: [PATCH] Fixed test_utils.tests.HTMLEqualTests.test_parsing_errors + following Python's HTMLParser fixed parsing. + +From: Natalia <124304+nessita@users.noreply.github.com> + +Further details about Python changes can be found in: +https://github.com/python/cpython/commit/0243f97cbadec8d985e63b1daec5d1cbc850cae3. + +Thank you Clifford Gama for the thorough review! + +Upstream-Status: Backport [https://github.com/django/django/commit/e4515dad7a6d953c0bd2414127ba36e1446ff41a] +Signed-off-by: Gyorgy Sarvari +--- + tests/test_utils/tests.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py +index a1a113a..d1a1e35 100644 +--- a/tests/test_utils/tests.py ++++ b/tests/test_utils/tests.py +@@ -736,7 +736,7 @@ class HTMLEqualTests(SimpleTestCase): + "('Unexpected end tag `div` (Line 1, Column 6)', (1, 6))" + ) + with self.assertRaisesMessage(AssertionError, error_msg): +- self.assertHTMLEqual('< div>', '
') ++ self.assertHTMLEqual('< div>', '
') + with self.assertRaises(HTMLParseError): + parse_html('

') + -- cgit v1.2.3-54-g00ecf