summaryrefslogtreecommitdiff
path: root/tests/utils_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils_tests')
-rw-r--r--tests/utils_tests/test_itercompat.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/utils_tests/test_itercompat.py b/tests/utils_tests/test_itercompat.py
new file mode 100644
index 0000000000..e6ea278ab4
--- /dev/null
+++ b/tests/utils_tests/test_itercompat.py
@@ -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([])