summaryrefslogtreecommitdiff
path: root/tests/m2m_regress
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-09-30Fixed #33984 -- Reverted "Fixed #32980 -- Made models cache related managers."Mariusz Felisiak
This reverts 4f8c7fd9d91b35e2c2922de4bb50c8c8066cbbc6 and adds two regression tests: - test_related_manager_refresh(), and - test_create_copy_with_m2m(). Thanks joeli for the report.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-11-08Fixed #32980 -- Made models cache related managers.Keryn Knight
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>
2019-04-29Refs #26022 -- Used context manager version of assertRaisesMessage in tests.Jon Dufresne
Follow up to 253adc2b8a52982139d40c4f55b3fd446e1cb8f3.
2018-12-27Followed style guide for model attribute ordering.Matt Wiens
2017-07-29Used assertRaisesMessage() to test Django's error messages.Mads Jensen
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-12-07Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.Tim Graham
2015-10-27Fixed #25550 -- Deprecated direct assignment to the reverse side of a ↵Tim Graham
related set.
2015-03-26Fixed #24505 -- Fixed clash with hidden m2m fields.Marco Fucci
Added support for multiple m2m fields with the same 'to' model and with related_name set to '+'.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-12-24Added a test to ensure bad assignation to M2M doesn't clear dataClaude Paroz
Refs #14394.
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-07-09Fixed #19671 -- Added warnings that null and validators are ignored for ↵Anubhav Joshi
ManyToManyField. Thanks Loic Bistuer and Tim Graham for help and review.
2014-03-30Corrected many style guide violations that the newest version of flake8 catchesAlex Gaynor
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-12-10Fixed E124 pep8 warnings.Loic Bistuer
2013-11-02PEP8 cleanupJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-10-10Whitespace cleanup.Tim Graham
* Removed trailing whitespace. * Added newline to EOF if missing. * Removed blank lines at EOF. * Removed some stray tabs.
2013-09-03Updated syncdb -> migrate in tests.Tim Graham
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