summaryrefslogtreecommitdiff
path: root/tests/utils_tests/test_datastructures.py
AgeCommit message (Collapse)Author
2025-08-14Fixed #36410 -- Added support for Template Partials to the Django Template ↵farhan
Language. Introduced `{% partialdef %}` and `{% partial %}` template tags to define and render reusable named fragments within a template file. Partials can also be accessed using the `template_name#partial_name` syntax via `get_template()`, `render()`, `{% include %}`, and other template-loading tools. Adjusted `get_template()` behavior to support partial resolution, with appropriate error handling for invalid names and edge cases. Introduced `PartialTemplate` to encapsulate partial rendering behavior. Includes tests and internal refactors to support partial context binding, exception reporting, and tag validation. Co-authored-by: Carlton Gibson <carlton@noumenal.es> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com> Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2023-02-15Completed test coverage for django.utils.datastructures.Marcelo Galigniana
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-03-10Refs #24121 -- Added __repr__() to OrderedSet.Nick Pope
2021-03-08Fixed #32517 -- Made OrderedSet reversible.Diego Lima
Refs #32516.
2020-10-30Updated MultiValueDict.update() to mirror dict.update() behavior.Nick Pope
Changes in behavior include: - Accepting iteration over empty sequences, updating nothing. - Accepting iterable of 2-tuples providing key-value pairs. - Failing with the same or comparable exceptions for invalid input. Notably this replaces the previous attempt to catch TypeError which was unreachable as the call to .items() resulted in AttributeError on non-dict objects.
2020-10-30Increased test coverage for django.utils.datastructures.MultiValueDict.Nick Pope
Co-authored-by: Mads Jensen <mje@inducks.org>
2020-10-30Increased test coverage for django.utils.datastructures.OrderedSet.Mads Jensen
Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
2020-02-07Used assertRaisesMessage() in various tests.Hasan Ramezani
2019-02-09Removed unneeded list() calls in sorted() argument.Sergey Fedoseev
2019-01-16Fixed #20147 -- Added HttpRequest.headers.Santiago Basulto
2019-01-02Used 4 space hanging indent for dictionaries.Tim Graham
Thanks Mariusz Felisiak for auditing.
2017-05-27Fixed #28249 -- Removed unnecessary dict.keys() calls.Jon Dufresne
iter(dict) is equivalent to iter(dict.keys()).
2017-04-11Fixed #28064 -- Removed double-quoting of key names in MultiValueDictKeyError.petedmarsh
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2016-12-09Fixed #27583 -- Fixed MultiValueDict.getlist() crash when values for key is ↵Mariusz Felisiak
None. Restored the behavior before 727d7ce6cba21363470aaefb2dc5353017531be3.
2016-09-16Fixed #27198 -- Made MultiValueDict.getlist() return a new list to prevent ↵Jani Tiainen
mutation.
2016-06-16Fixed #26747 -- Used more specific assertions in the Django test suite.Jon Dufresne
2016-01-29Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as ↵Hasan
appropriate.
2016-01-29Refs #26022 -- Used context manager version of assertRaisesMessage in tests.Hasan
2016-01-25Fixed #26125 -- Fixed E731 flake warnings.userimack
2015-07-09Fixed #25093 -- Added utils.datastructures.OrderedSet.__len__()darkryder
2015-05-16Removed redundant list() calls.Tim Graham
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-17Removed django.utils.datastructures.SortedDict per deprecation timeline.Tim Graham
2015-01-17Removed django.utils.datastructures.MergeDict per deprecation timeline; refs ↵Tim Graham
#18659.
2014-12-30Applied ignore_warnings to Django testsClaude Paroz
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-10-16Fixed #23664 -- Provided a consistent definition for OrderedSet.__bool__Thomas Chaumeny
This also defines QuerySet.__bool__ for consistency though this should not have any consequence as bool(qs) used to fallback on QuerySet.__len__ in Py3.
2014-03-30Fixed #22338 -- Fixed a test dependent on dictionary key iteration order.Tim Graham
2014-03-22Advanced deprecation warnings for 1.8.Aymeric Augustin
2013-12-14Fixed E127 pep8 warnings.Loic Bistuer
2013-10-26Fix all violators of E231Alex Gaynor
2013-10-19Removed unused local variables in tests.Tim Graham
2013-10-17Fixed #18659 -- Deprecated request.REQUEST and MergeDictBouke Haarsma
Thanks Aymeric Augustin for the suggestion.
2013-09-18Fixed #15625 -- Made message in MultiValueDictKeyError less verbose.Tim Graham
Thanks margieroginski for the suggestion.
2013-09-03Silenced deprecation warnings in SortedDict tests; refs [07876cf02b]Tim Graham
2013-09-02Replaced "not PY3" by "PY2", new in six 1.4.0.Aymeric Augustin
2013-06-28Removed insert(), value_for_insert() SortedDict methods deprecated in Django ↵Ramiro Morales
1.5.
2013-04-26Fixed #20321 -- Added missing key name in MergeDict KeyError messageClaude Paroz
Thanks mark.harviston et gmail.com for the report.
2013-04-19Fixed #20276 -- Implemented __bool__ for MergeDictAnton Baklanov
MergeDict evaluates now to False if all contained dicts are empty. Thanks til for the report and the initial patch.
2013-04-12Modified utils_tests for unittest2 discovery.Preston Timmons