summaryrefslogtreecommitdiff
path: root/tests/foreign_object/tests.py
AgeCommit message (Collapse)Author
2018-11-27Adjusted code style of a few test data setup methods.Simon Charette
Thanks Mariusz for suggesting it.
2018-11-27Switched setUp() to setUpTestData() where possible in Django's tests.Simon Charette
2018-11-08Fixed #29908 -- Fixed setting of foreign key after related set access if ↵Simon Charette
ForeignKey uses to_field. Adjusted known related objects handling of target fields which relies on from and to_fields and has the side effect of fixing a bug bug causing N+1 queries when using reverse foreign objects. Thanks Carsten Fuchs for the report.
2017-07-29Used assertRaisesMessage() to test Django's error messages.Mads Jensen
2017-06-01Sorted imports per isort 4.2.9.Tim Graham
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-02-11Fixed #26153 -- Reallowed Q-objects in ↵Anssi Kääriäinen
ForeignObject.get_extra_descriptor_filter().
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan
2016-01-06Fixed #25746 -- Isolated inlined test models registration.Simon Charette
Thanks to Tim for the review.
2015-12-24Fixed #25972 -- Restored support for the isnull lookup with ForeignObject.Tomo Otsuka
2015-11-14Refs #25745 -- Isolated a foreign_object test.Simon Charette
2015-11-03Fixed #25668 -- Misc spelling errorsVille Skyttä
2015-10-14Refs #25535 -- Minor edits to ForeignObject check changes.Tim Graham
2015-10-12Fixed #25535 -- Made ForeignObject checks less strict.Antoine Catton
Check that the foreign object `from_fields` are a subset of any unique constraints on the foreign model.
2015-08-14Moved foreign_object models.py into a module.Tim Graham
2015-08-03Added test for ForeignObject.get_extra_descriptor_filter()Alex Hill
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-12-02Ensured foreign_object tests reset language properly.Preston Timmons
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2013-12-06Fixed #21566 -- Fixed AttributeError when using bulk_create with ForeignObject.Roger Hu
2013-11-02PEP8 cleanupJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-08-13Fixed #20874 -- bump_prefix() in nested subqueriesAnssi Kääriäinen
Also made some cleanup to build_filter() code by introducing submethods solve_lookup_type() and prepare_lookup_value().
2013-08-06Fixed ordering related test failureAnssi Kääriäinen
Also PEP8 + python_2_unicode_compatible cleanup done.
2013-07-25Fixed ._meta.pk_index() virtual field failureAnssi Kääriäinen
2013-06-27Add related_query_name to ForeignKey/M2M. Refs #20244Andrew Godwin
2013-05-27Fixed #17582 - Added message to DoesNotExist exceptions.Tim Graham
Thanks simon@ for the suggestion and JordanPowell for the initial patch.
2013-05-09Fixed #19733 - deprecated ModelForms without 'fields' or 'exclude', and ↵Luke Plant
added '__all__' shortcut This also updates all dependent functionality, including modelform_factory and modelformset_factory, and the generic views `ModelFormMixin`, `CreateView` and `UpdateView` which gain a new `fields` attribute.
2013-03-24Fixed 19385 -- Added ORM support for multicolumn joinsAnssi Kääriäinen
This patch iproved two major parts in Django. First, the fields.related was refactored. The main addition there was ForeignObject. Second, the ORM now handles multicolumn joins in most cases, though there are still cases that do not work correcly (split_exclude() for example). In addition there were extesive changes to how GenericRelation works. Before it was a fake m2m field, now it is a pure virtual fields and is based on ForeignObject. There is still much room for improvement. The related fields code is still somewhat confusing, and how fields are represented in model._meta should also be revisited. This patch was written mostly by Jeremy Tillman with some final polish by the committer.