1
0
mirror of https://github.com/django/django.git synced 2024-12-28 03:55:50 +00:00
django/tests/utils_tests
Nick Pope 711c054722 [5.0.x] Refs #31262 -- Added __eq__() and __getitem__() to BaseChoiceIterator.
This makes it easier to work with lazy iterators used for callables,
etc. when extracting items or comparing to lists, e.g. during testing.

Also added `BaseChoiceIterator.__iter__()` to make it clear that
subclasses must implement this and added `__all__` to the module.

Co-authored-by: Adam Johnson <me@adamj.eu>
Co-authored-by: Natalia Bidart <124304+nessita@users.noreply.github.com>

Backport of 07fa79ef2b from main
2023-10-23 14:51:27 -03:00
..
archives
eggs
files Rewrote strip_tags test file to lorem ipsum. 2022-03-08 14:50:06 +01:00
test_module Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
traversal_archives
__init__.py
deconstructible_classes.py
models.py
test_archive.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_autoreload.py Fixed #34787 -- Fixed autoreloader crash when run from installed script on Windows. 2023-08-28 12:57:14 +02:00
test_choices.py [5.0.x] Refs #31262 -- Added __eq__() and __getitem__() to BaseChoiceIterator. 2023-10-23 14:51:27 -03:00
test_connection.py Prevented initialization of unused database connections. 2022-03-17 07:40:57 +01:00
test_crypto.py Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_datastructures.py Completed test coverage for django.utils.datastructures. 2023-02-15 07:45:00 +01:00
test_dateformat.py Refs #32365 -- Removed support for pytz timezones per deprecation timeline. 2023-01-17 11:49:15 +01:00
test_dateparse.py Refs #33173 -- Fixed test_dateparse tests on Python 3.11+. 2022-05-09 10:38:11 +02:00
test_deconstruct.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_decorators.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_duration.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_encoding.py Fixed CVE-2023-41164 -- Fixed potential DoS in django.utils.encoding.uri_to_iri(). 2023-09-04 11:58:37 +02:00
test_feedgenerator.py Refs #32365 -- Removed internal uses of utils.timezone.utc alias. 2022-03-24 06:29:50 +01:00
test_functional.py Allowed custom formatting of lazy() objects. 2023-06-12 06:09:20 +02:00
test_hashable.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_html.py Fixed #34609 -- Deprecated calling format_html() without arguments. 2023-06-06 14:14:57 +02:00
test_http.py Refs #30116 -- Simplified tests related with dictionary order. 2023-07-12 11:06:59 +02:00
test_inspect.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_ipv6.py Updated documentation and comments for RFC updates. 2022-11-10 13:52:17 +01:00
test_jslex.py Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
test_lazyobject.py Fixed utils_tests.test_lazyobject.SimpleLazyObjectPickleTestCase. 2023-08-20 16:09:07 +02:00
test_lorem_ipsum.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_module_loading.py Fixed #34233 -- Dropped support for Python 3.8 and 3.9. 2023-01-18 09:46:01 +01:00
test_no_submodule.py
test_numberformat.py Refs #34000 -- Optimized handling None values in numberformat.format(). 2022-09-12 13:02:50 +02:00
test_os_utils.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_regex_helper.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_safestring.py Fixed #20296 -- Prevented mark_safe() from evaluating lazy objects. 2022-02-21 10:11:26 +01:00
test_simplelazyobject.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_termcolors.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_text.py [5.0.x] Fixed CVE-2023-43665 -- Mitigated potential DoS in django.utils.text.Truncator when truncating HTML text. 2023-10-04 09:38:26 -03:00
test_timesince.py Refs #34483 -- Fixed timesince()/timeuntil() with timezone-aware dates on different days and interval less than 1 day. 2023-04-14 17:41:03 +02:00
test_timezone.py Fixed #34233 -- Dropped support for Python 3.8 and 3.9. 2023-01-18 09:46:01 +01:00
test_tree.py Refs #32948 -- Renamed Node._new_instance() to Node.create(). 2022-07-27 10:06:24 +02:00
utils.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00