summaryrefslogtreecommitdiff
path: root/tests/model_inheritance/tests.py
Commit message (Collapse)AuthorAgeFilesLines
* Refs #33984 -- Added test for creating copies of model instances with ↵Mariusz Felisiak2022-11-021-0/+17
| | | | inherited m2m fields.
* Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner2022-10-081-11/+11
| | | | | | assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
* Replaced assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() ↵Mariusz Felisiak2022-10-071-3/+3
| | | | | where appropriate. Follow up to 3f7b3275627385f8f7531fca01cdda50d4ec6b6e.
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-071-96/+144
|
* Fixed 32956 -- Lowercased spelling of "web" and "web framework" where ↵David Smith2021-07-291-1/+1
| | | | appropriate.
* Fixed #30427, Fixed #16176 -- Corrected setting descriptor in ↵Carlton Gibson2021-06-151-0/+31
| | | | | | Field.contribute_to_class(). Co-authored-by: Jarek Glowacki <jarekwg@gmail.com>
* Fixed #32355 -- Dropped support for Python 3.6 and 3.7Mariusz Felisiak2021-02-101-3/+0
|
* Fixed #31223 -- Added __class_getitem__() to Manager and QuerySet.sobolevn2020-04-151-0/+8
|
* Fixed #31285 -- Fixed inherited Meta.ordering of "-pk".Jon Dufresne2020-03-191-1/+14
|
* Fixed typo in tests/model_inheritance/tests.py.Nikita Sobolev2020-02-061-1/+1
|
* Fixed #30116 -- Dropped support for Python 3.5.Tim Graham2019-01-301-4/+0
|
* Fixed #29970, #30041 -- Made ModelBase.__new__() pass attrs without ↵Sergey Fedoseev2018-12-221-2/+17
| | | | contribute_to_class() to type.__new__().
* Fixed #29568 -- Prevented unnecessary UPDATE queries creating child models.François Dupayrat2018-07-201-0/+18
|
* Fixed some assertTrue() that were intended to be assertEqual().Sergey Fedoseev2018-07-091-2/+2
|
* Fixed #28834 -- Followed ancestor links on field cache lookup failure.Simon Charette2017-11-291-0/+16
| | | | Thanks Tim for the review.
* Fixed #28695 -- Allowed models to use __init_subclass__().k2017-10-131-0/+19
|
* Used assertRaisesMessage() to test Django's error messages.Mads Jensen2017-07-291-3/+9
|
* Refs #23919 -- Removed six.<various>_types usageClaude Paroz2017-01-181-3/+2
| | | | Thanks Tim Graham and Simon Charette for the reviews.
* Refs #23919 -- Removed encoding preambles and future importsClaude Paroz2017-01-181-2/+0
|
* Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za2016-11-101-7/+5
|
* Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with ↵Mads Jensen2016-09-131-4/+2
| | | | assertSequenceEqual().
* Avoided uncessary table creation in model_inheritance tests.Simon Charette2016-05-311-42/+30
|
* Fixed E128 flake8 warnings in tests/.Tim Graham2016-04-081-4/+2
|
* Fixed #26413 -- Fixed a regression with abstract model inheritance and ↵Simon Charette2016-03-281-2/+18
| | | | | | explicit parent links. Thanks Trac alias trkjgrdg for the report and Tim for investigation and review.
* Removed unnecessary filter kwarg from .get() in a test.Adam Alton2016-03-141-1/+1
|
* Refs #26022 -- Used context manager version of assertRaises in tests.Hasan2016-01-291-20/+14
|
* Fixed #25354 -- Added class/app_label interpolation for related_query_name.James Pulec2016-01-281-0/+9
|
* Renamed __unicode__() to __str__() in some test comments.Tim Graham2015-11-191-1/+1
|
* Fixed #25550 -- Deprecated direct assignment to the reverse side of a ↵Tim Graham2015-10-271-2/+2
| | | | related set.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-3/+4
|
* Fixed #15321 -- Honored ancestors unique checks.Aron Podrigal2015-02-031-2/+32
| | | | Thanks to Tim for the review.
* Removed support for syncing apps without migrations per deprecation timeline.Tim Graham2015-01-181-1/+1
| | | | | Kept support for creating models without migrations when running tests (especially for Django's test suite).
* Refs #18586 -- Split up model_inheritance.ModelInheritanceTestAlexander Shchapov2014-12-031-133/+135
|
* Fixed #20392 -- Added TestCase.setUpTestData()Thomas Chaumeny2014-12-031-7/+14
| | | | Each TestCase is also now wrapped in a class-wide transaction.
* Fixed typos using https://github.com/vlajos/misspell_fixerVeres Lajos2014-11-031-1/+1
|
* Fixed #23370 -- defer() + select_related() crashed with inherited models.Akis Kesoglou2014-08-301-0/+37
|
* Fixed several typos in DjangoAlex Gaynor2014-05-281-1/+1
|
* Appeased flake8 2.1.0.Aymeric Augustin2014-04-211-1/+1
|
* Fixed #22402 -- Consolidated model_inheritance tests.Aymeric Augustin2014-04-211-2/+40
| | | | | | | 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.
* Fixed #17673 -- Forbid field shadowing.Christopher Medrela2014-02-101-33/+1
| | | | Thanks Anssi Kääriäinen for the suggestion.
* Fixed #20946 -- model inheritance + m2m failureAnssi Kääriäinen2013-08-211-1/+15
| | | | | | | 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.
* PEP 8 cleanupAnssi Kääriäinen2013-08-191-26/+36
|
* Fixed #12567 -- Incorrect SQL in model inheritance caseAnssi Kääriäinen2013-08-191-0/+24
| | | | | An isnull lookup produced incorrect SQL. This was already fixed earlier, so only tests added.
* Made Model.__eq__ consider proxy models equivalentAnssi Kääriäinen2013-08-191-0/+5
| | | | Fixed #11892, fixed #16458, fixed #14492.
* Removed most of absolute_import importsClaude Paroz2013-07-291-1/+1
| | | | | Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
* Fixed #16649 -- Refactored save_base logicAnssi Kääriäinen2013-03-141-1/+1
| | | | | | | | | | | | | | | | | | | Model.save() will use UPDATE - if not updated - INSERT instead of SELECT - if found UPDATE else INSERT. This should save a query when updating, but will cost a little when inserting model with PK set. Also fixed #17341 -- made sure .save() commits transactions only after the whole model has been saved. This wasn't the case in model inheritance situations. The save_base implementation was refactored into multiple methods. A typical chain for inherited save is: save_base() _save_parents(self) for each parent: _save_parents(parent) _save_table(parent) _save_table(self)
* Import `CaptureQueriesContext` from its original module.Simon Charette2013-03-021-1/+1
|
* Fixed #10399 -- Tested that o2o field updates are not constrained by an ↵Simon Charette2013-03-021-1/+25
| | | | inner query.
* Merged regressiontests and modeltests into the test root.Florian Apolloner2013-02-261-0/+296