1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00
django/tests/utils_tests/test_itercompat.py

16 lines
549 B
Python

# 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([])