1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #34983 -- Deprecated django.utils.itercompat.is_iterable().

This commit is contained in:
Nick Pope
2023-11-24 11:06:29 +00:00
committed by GitHub
parent eabfa2d0e3
commit 5e28cd3f2c
11 changed files with 54 additions and 16 deletions

View File

@@ -0,0 +1,15 @@
# RemovedInDjango60Warning: Remove this entire module.
from django.test import SimpleTestCase
from django.utils.deprecation import RemovedInDjango60Warning
from django.utils.itercompat import is_iterable
class TestIterCompat(SimpleTestCase):
def test_is_iterable_deprecation(self):
msg = (
"django.utils.itercompat.is_iterable() is deprecated. "
"Use isinstance(..., collections.abc.Iterable) instead."
)
with self.assertWarnsMessage(RemovedInDjango60Warning, msg):
is_iterable([])