summaryrefslogtreecommitdiff
path: root/tests/model_inheritance/tests.py
AgeCommit message (Collapse)Author
2026-02-05Refs #33579 -- Added extra tests for NotUpdated exception.Nick Pope
When `NotUpdated` was added in ab148c02cedbac492f29930dcd5346e1af052635, these additional tests that have equivalents for the `DoesNotExist` and `MultipleObjectsReturned` exceptions were missed.
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.
2025-01-14Fixed #36093 -- Adjusted unique checks to account for inherited primary keys.Simon Charette
Regression in bf7b17d16d3978b2e1cee4a0f7ce8840bd1a8dc4 refs #36075. Thanks Sage Abdullah for the report and tests.
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2023-06-20Refs #34634 -- Fixed creating diamond-shaped MTI objects with ancestors ↵Akash Kumar Sen
inherited from different paths. Co-authored-by: Simon Charette <charette.s@gmail.com>
2023-06-15Fixed #33414 -- Fixed creating diamond-shaped MTI objects for common ↵Akash Kumar Sen
ancestor with primary key that has a default. Co-authored-by: Simon Charette <charette.s@gmail.com>
2022-11-02Refs #33984 -- Added test for creating copies of model instances with ↵Mariusz Felisiak
inherited m2m fields.
2022-10-08Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner
assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
2022-10-07Replaced assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() ↵Mariusz Felisiak
where appropriate. Follow up to 3f7b3275627385f8f7531fca01cdda50d4ec6b6e.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-07-29Fixed 32956 -- Lowercased spelling of "web" and "web framework" where ↵David Smith
appropriate.
2021-06-15Fixed #30427, Fixed #16176 -- Corrected setting descriptor in ↵Carlton Gibson
Field.contribute_to_class(). Co-authored-by: Jarek Glowacki <jarekwg@gmail.com>
2021-02-10Fixed #32355 -- Dropped support for Python 3.6 and 3.7Mariusz Felisiak
2020-04-15Fixed #31223 -- Added __class_getitem__() to Manager and QuerySet.sobolevn
2020-03-19Fixed #31285 -- Fixed inherited Meta.ordering of "-pk".Jon Dufresne
2020-02-06Fixed typo in tests/model_inheritance/tests.py.Nikita Sobolev
2019-01-30Fixed #30116 -- Dropped support for Python 3.5.Tim Graham
2018-12-22Fixed #29970, #30041 -- Made ModelBase.__new__() pass attrs without ↵Sergey Fedoseev
contribute_to_class() to type.__new__().
2018-07-20Fixed #29568 -- Prevented unnecessary UPDATE queries creating child models.François Dupayrat
2018-07-09Fixed some assertTrue() that were intended to be assertEqual().Sergey Fedoseev
2017-11-29Fixed #28834 -- Followed ancestor links on field cache lookup failure.Simon Charette
Thanks Tim for the review.
2017-10-13Fixed #28695 -- Allowed models to use __init_subclass__().k
2017-07-29Used assertRaisesMessage() to test Django's error messages.Mads Jensen
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
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-09-13Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with ↵Mads Jensen
assertSequenceEqual().
2016-05-31Avoided uncessary table creation in model_inheritance tests.Simon Charette
2016-04-08Fixed E128 flake8 warnings in tests/.Tim Graham
2016-03-28Fixed #26413 -- Fixed a regression with abstract model inheritance and ↵Simon Charette
explicit parent links. Thanks Trac alias trkjgrdg for the report and Tim for investigation and review.
2016-03-14Removed unnecessary filter kwarg from .get() in a test.Adam Alton
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan
2016-01-28Fixed #25354 -- Added class/app_label interpolation for related_query_name.James Pulec
2015-11-19Renamed __unicode__() to __str__() in some test comments.Tim Graham
2015-10-27Fixed #25550 -- Deprecated direct assignment to the reverse side of a ↵Tim Graham
related set.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-03Fixed #15321 -- Honored ancestors unique checks.Aron Podrigal
Thanks to Tim for the review.
2015-01-18Removed support for syncing apps without migrations per deprecation timeline.Tim Graham
Kept support for creating models without migrations when running tests (especially for Django's test suite).
2014-12-03Refs #18586 -- Split up model_inheritance.ModelInheritanceTestAlexander Shchapov
2014-12-03Fixed #20392 -- Added TestCase.setUpTestData()Thomas Chaumeny
Each TestCase is also now wrapped in a class-wide transaction.
2014-11-03Fixed typos using https://github.com/vlajos/misspell_fixerVeres Lajos
2014-08-30Fixed #23370 -- defer() + select_related() crashed with inherited models.Akis Kesoglou
2014-05-28Fixed several typos in DjangoAlex Gaynor
2014-04-21Appeased flake8 2.1.0.Aymeric Augustin
2014-04-21Fixed #22402 -- Consolidated model_inheritance tests.Aymeric Augustin
The model_inheritance_same_model_name tests couldn't be run without the model_inheritance tests. Make the problem go away by merging them. Thanks timo for the report.
2014-02-10Fixed #17673 -- Forbid field shadowing.Christopher Medrela
Thanks Anssi Kääriäinen for the suggestion.
2013-08-21Fixed #20946 -- model inheritance + m2m failureAnssi Kääriäinen
Cleaned up the internal implementation of m2m fields by removing related.py _get_fk_val(). The _get_fk_val() was doing the wrong thing if asked for the foreign key value on foreign key to parent model's primary key when child model had different primary key field.
2013-08-19PEP 8 cleanupAnssi Kääriäinen
2013-08-19Fixed #12567 -- Incorrect SQL in model inheritance caseAnssi Kääriäinen
An isnull lookup produced incorrect SQL. This was already fixed earlier, so only tests added.
2013-08-19Made Model.__eq__ consider proxy models equivalentAnssi Kääriäinen
Fixed #11892, fixed #16458, fixed #14492.