summaryrefslogtreecommitdiff
path: root/tests/many_to_one_null
AgeCommit message (Collapse)Author
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2022-02-22Fixed #19580 -- Unified behavior of reverse foreign key and many-to-many ↵Albert Defler
relations for unsaved instances.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2020-11-06Fixed #31235 -- Made assertQuerysetEqual() compare querysets directly.Hasan Ramezani
This also replaces assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() where appropriate. Co-authored-by: Peter Inglesby <peter.inglesby@gmail.com> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-05-15Refs #31395 -- Relied on setUpTestData() test data isolation in various tests.Simon Charette
2020-04-30Removed unused __str__() methods in tests models.Mariusz Felisiak
Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1.
2018-06-25Fixed #29447 -- Made RelatedManager.set() pass bulk argument to clear().Alexandr Tatarinov
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
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
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan
2015-10-27Fixed #25550 -- Deprecated direct assignment to the reverse side of a ↵Tim Graham
related set.
2015-09-21Renamed descriptor classes for related objects.Aymeric Augustin
The old names were downright confusing. Some seemed to mean the opposite of what the class actually did. The new names follow a consistent nomenclature: (Forward|Reverse)(ManyToOne|OneToOne|ManyToMany)Descriptor. I mentioned combinations that do not exist in the docstring in order to help people who would search for them in the code base.
2015-07-28Fixed #18556 -- Allowed RelatedManager.add() to execute 1 query where possible.Tim Graham
Thanks Loic Bistuer for review.
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-02-05Fixed #6707 -- Added RelatedManager.set() and made descriptors' __set__ use it.Loic Bistuer
Thanks Anssi Kääriäinen, Carl Meyer, Collin Anderson, and Tim Graham for the reviews.
2014-09-24Removed numbering from the models.py header of some test packages.Loic Bistuer
This is a reliqua from the early days of the modeltests/regressiontests era.
2014-09-24Consolidated some many_to_one tests.Loic Bistuer
2014-03-30Fixed mistake in tests from commit 2039908. Refs #19816.Loic Bistuer
2014-03-30Fixed #19816 -- Pre-evaluate querysets used in direct relation assignments.Loic Bistuer
Since assignments on M2M or reverse FK descriptors is composed of a `clear()`, followed by an `add()`, `clear()` could potentially affect the value of the assigned queryset before the `add()` step; pre-evaluating it solves the problem. This patch fixes the issue for ForeignRelatedObjectsDescriptor, ManyRelatedObjectsDescriptor, and ReverseGenericRelatedObjectsDescriptor. It completes 6cb6e1 which addressed ReverseManyRelatedObjectsDescriptor.
2013-11-02PEP8 cleanupJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-07-29Removed most of absolute_import importsClaude Paroz
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner