forked from pool/python-Django
gh#django/django#17843 - Update to 4.2.10 (bsc#1219683, CVE-2024-24680): - Django 4.2.10 fixes a security issue with severity "moderate" in 4.2.9. CVE-2024-24680: Potential denial-of-service in intcomma template filter The intcomma template filter was subject to a potential denial-of-service attack when used with very long strings. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-Django?expand=0&rev=158
29 lines
1.4 KiB
Diff
29 lines
1.4 KiB
Diff
From 20b7aac7ca60b0352d926340622e618bcbee54a8 Mon Sep 17 00:00:00 2001
|
|
From: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
Date: Mon, 16 Oct 2023 06:27:27 +0200
|
|
Subject: [PATCH] Refs #34900, Refs #34118 -- Updated assertion in
|
|
test_skip_class_unless_db_feature() test on Python 3.12.1+.
|
|
|
|
Python 3.12.1+ no longer includes skipped tests in the number of
|
|
running tests. Check out:
|
|
|
|
https://github.com/python/cpython/issues/110890#issuecomment-1763458686
|
|
https://github.com/python/cpython/pull/106588
|
|
---
|
|
tests/test_utils/tests.py | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
Index: Django-4.2.10/tests/test_utils/tests.py
|
|
===================================================================
|
|
--- Django-4.2.10.orig/tests/test_utils/tests.py
|
|
+++ Django-4.2.10/tests/test_utils/tests.py
|
|
@@ -185,7 +185,7 @@ class SkippingClassTestCase(TestCase):
|
|
result = unittest.TextTestRunner(stream=StringIO()).run(test_suite)
|
|
# PY312: Python 3.12.1+ no longer includes skipped tests in the number
|
|
# of running tests.
|
|
- self.assertEqual(result.testsRun, 1 if sys.version_info >= (3, 12, 1) else 3)
|
|
+ self.assertEqual(result.testsRun, 1 if sys.version_info == (3, 12, 1) else 3)
|
|
self.assertEqual(len(result.skipped), 2)
|
|
self.assertEqual(result.skipped[0][1], "Database has feature(s) __class__")
|
|
self.assertEqual(result.skipped[1][1], "Database has feature(s) __class__")
|