summaryrefslogtreecommitdiff
path: root/tests/serializers/test_natural.py
AgeCommit message (Collapse)Author
2026-02-26Fixed #36750 -- Made ordering of M2M objects deterministic in serializers.VIZZARD-X
Co-authored-by: Simon Charette <charette.s@gmail.com> Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2026-02-10Modified tests to format PKs with %s rather than %d.Tim Graham
It's how Django formats values internally and makes tests compatible with databases that use non-integer primary keys.
2025-12-22Fixed #36786 -- Fixed XML serialization of None values in natural keys.Youngkwang Yang
None values in natural keys were incorrectly serialized as the string "None", causing deserialization to fail for fields like UUIDField.
2025-12-03Fixed #35729 -- Enabled natural key serialization opt-out for subclasses.rimi0108
Refactored serialization logic to allow models inheriting a natural_key() method (e.g. AbstractBaseUser) to explicitly opt out of natural key serialization by returning an empty tuple from the method. Thanks Jonas Dittrich for the report. Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2022-04-18Fixed various tests on MySQL with MyISAM storage engine.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-02-05Fixed #32420 -- Fixed detecting primary key values in deserialization when ↵Mikolaj Rybinski
PK is also a FK.
2018-11-27Fixed #28385 -- Fixed deserializing natural keys when primary key has a ↵dmytryi.striletskyi
default value. Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
2018-07-13Fixed #26291 -- Allowed loaddata to handle forward references in natural_key ↵Peter Inglesby
fixtures.
2018-02-12Fixed #24607 -- Serialized natural keys in multi-table inheritance models.Denys Duchier
Thanks João Paulo Melo de Sampaio for the test.
2017-09-06Refs #23919 -- Replaced usage of django.utils.functional.curry() with ↵Sergey Fedoseev
functools.partial()/partialmethod().
2017-02-11Fixed #27742 -- Reverted "Fixed #24607 -- Serialized natural keys in ↵Tim Graham
multi-table inheritance models." This reverts commit 74a575eb7296fb04e1fc2bd4e3f68dee3c66ee0a as it causes unexpected migrations and doesn't seem to be the best solution.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-10-12Fixed #24607 -- Serialized natural keys in multi-table inheritance models.João Sampaio
2016-06-16Fixed #26747 -- Used more specific assertions in the Django test suite.Jon Dufresne
2016-04-08Fixed E128 flake8 warnings in tests/.Tim Graham
2015-09-26Separated natural key serialization testsClaude Paroz