summaryrefslogtreecommitdiff
path: root/tests/foreign_object
AgeCommit message (Collapse)Author
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-02-19Fixed typos in docs and a test comment.Yoo In Keun
2020-02-04Simplified imports from django.db and django.contrib.gis.db.Nick Pope
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.
2018-08-22Removed invalid Meta.ordering in a test model.Tim Graham
It never worked and was never used.
2018-03-16Fixed hanging indentation in various code.Mariusz Felisiak
2017-09-22Fixed #27332 -- Added FilteredRelation API for conditional join (ON clause) ↵Nicolas Delaby
support. Thanks Anssi Kääriäinen for contributing to the patch.
2017-08-10Refs #16043 -- Refactored internal fields value cache.Paulo
* Removed all hardcoded logic for _{fieldname}_cache. * Added an internal API for interacting with the field values cache. Thanks carljm and MarkusH for support.
2017-07-29Used assertRaisesMessage() to test Django's error messages.Mads Jensen
2017-06-01Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne
2017-06-01Sorted imports per isort 4.2.9.Tim Graham
2017-05-10Decreased max_length for char fields unless absolutely needed. (#8485)Florian Apolloner
2017-03-17Replaced type-specific assertions with assertEqual().Tim Graham
Python docs say, "it's usually not necessary to invoke these methods directly."
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude 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-09-09Refs #25415 -- Fixed invalid models in the test suite.Adam Chainz
2016-05-19Fixed #26515 -- Fixed Query.trim_joins() for nested ForeignObjects.darius BERNARD
2016-04-13Refs #16508 -- Renamed the current "virtual" fields to "private".Michal Petrucha
The only reason why GenericForeignKey and GenericRelation are stored separately inside _meta is that they need to be cloned for every model subclass, but that's not true for any other virtual field. Actually, it's only true for GenericRelation.
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-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-08-15Fixed #25064 -- Allowed empty join columns.Alex Hill
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-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-03-25Renamed Field.rel attribute to remote_fieldAnssi Kääriäinen
Field.rel is now deprecated. Rel objects have now also remote_field attribute. This means that self == self.remote_field.remote_field. In addition, made the Rel objects a bit more like Field objects. Still, marked ManyToManyFields as null=True.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-12-02Ensured foreign_object tests reset language properly.Preston Timmons
2014-11-16Renamed qn to compilerJosh Smeaton
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-03-03Fixed many typos in comments and docstrings.Rodolfo Carvalho
Thanks Piotr Kasprzyk for help with the patch.
2013-12-06Fixed #21566 -- Fixed AttributeError when using bulk_create with ForeignObject.Roger Hu
2013-12-01Fixed incorrect type for max_length.Tim Graham
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.