summaryrefslogtreecommitdiff
path: root/tests/foreign_object
Commit message (Collapse)AuthorAgeFilesLines
* Refs #16055 -- Deprecated ↵David Wobrock2023-04-181-0/+47
| | | | get_joining_columns()/get_reverse_joining_columns() methods.
* Fixed #16055 -- Fixed crash when filtering against char/text GenericRelation ↵David Wobrock2023-04-181-1/+1
| | | | relation on PostgreSQL.
* Refs #33476 -- Applied Black's 2023 stable style.David Smith2023-02-011-2/+0
| | | | | | | | Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
* Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner2022-10-082-18/+18
| | | | | | assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
* Removed redundant QuerySet.all() calls in docs and tests.Nick Pope2022-02-221-1/+1
| | | | Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager.
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-072-7/+12
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-079-300/+425
|
* Fixed #32996 -- Cached PathInfos on relations.Keryn Knight2021-11-031-0/+103
| | | | | | PathInfo values are ostensibly static over the lifetime of the object for which they're requested, so the data can be memoized, quickly amortising the cost over the process' duration.
* Fixed #32951 -- Removed Query.where_class & co.Nick Pope2021-07-222-3/+3
| | | | Unused since 3caf957ed5eaa831a485abcb89f27266dbf3e82b.
* Fixed #32366 -- Updated datetime module usage to recommended approach.Nick Pope2021-05-121-1/+1
| | | | | | | - Replaced datetime.utcnow() with datetime.now(). - Replaced datetime.utcfromtimestamp() with datetime.fromtimestamp(). - Replaced datetime.utctimetuple() with datetime.timetuple(). - Replaced calendar.timegm() and datetime.utctimetuple() with datetime.timestamp().
* Fixed #31235 -- Made assertQuerysetEqual() compare querysets directly.Hasan Ramezani2020-11-061-6/+6
| | | | | | | | 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>
* Fixed typos in docs and a test comment.Yoo In Keun2020-02-191-1/+1
|
* Simplified imports from django.db and django.contrib.gis.db.Nick Pope2020-02-043-10/+6
|
* Adjusted code style of a few test data setup methods.Simon Charette2018-11-271-4/+1
| | | | Thanks Mariusz for suggesting it.
* Switched setUp() to setUpTestData() where possible in Django's tests.Simon Charette2018-11-272-18/+19
|
* Fixed #29908 -- Fixed setting of foreign key after related set access if ↵Simon Charette2018-11-081-8/+9
| | | | | | | | | | 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.
* Removed invalid Meta.ordering in a test model.Tim Graham2018-08-221-1/+0
| | | | It never worked and was never used.
* Fixed hanging indentation in various code.Mariusz Felisiak2018-03-161-1/+2
|
* Fixed #27332 -- Added FilteredRelation API for conditional join (ON clause) ↵Nicolas Delaby2017-09-221-5/+21
| | | | | support. Thanks Anssi Kääriäinen for contributing to the patch.
* Refs #16043 -- Refactored internal fields value cache.Paulo2017-08-101-2/+2
| | | | | | | * Removed all hardcoded logic for _{fieldname}_cache. * Added an internal API for interacting with the field values cache. Thanks carljm and MarkusH for support.
* Used assertRaisesMessage() to test Django's error messages.Mads Jensen2017-07-291-2/+12
|
* Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne2017-06-011-1/+1
|
* Sorted imports per isort 4.2.9.Tim Graham2017-06-011-1/+0
|
* Decreased max_length for char fields unless absolutely needed. (#8485)Florian Apolloner2017-05-101-1/+1
|
* Replaced type-specific assertions with assertEqual().Tim Graham2017-03-171-3/+3
| | | Python docs say, "it's usually not necessary to invoke these methods directly."
* Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand2017-01-252-3/+3
|
* Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette2017-01-191-1/+1
|
* Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz2017-01-183-9/+0
|
* Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za2016-11-102-2/+1
|
* Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with ↵Mads Jensen2016-09-131-12/+18
| | | | assertSequenceEqual().
* Refs #25415 -- Fixed invalid models in the test suite.Adam Chainz2016-09-091-1/+1
|
* Fixed #26515 -- Fixed Query.trim_joins() for nested ForeignObjects.darius BERNARD2016-05-193-2/+70
|
* Refs #16508 -- Renamed the current "virtual" fields to "private".Michal Petrucha2016-04-131-2/+2
| | | | | | | 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.
* Fixed #26153 -- Reallowed Q-objects in ↵Anssi Kääriäinen2016-02-112-0/+26
| | | | ForeignObject.get_extra_descriptor_filter().
* Refs #26022 -- Used context manager version of assertRaises in tests.Hasan2016-01-291-1/+2
|
* Fixed #25746 -- Isolated inlined test models registration.Simon Charette2016-01-061-13/+3
| | | | Thanks to Tim for the review.
* Fixed #25972 -- Restored support for the isnull lookup with ForeignObject.Tomo Otsuka2015-12-242-6/+19
|
* Refs #25745 -- Isolated a foreign_object test.Simon Charette2015-11-141-0/+13
|
* Fixed #25668 -- Misc spelling errorsVille Skyttä2015-11-031-1/+1
|
* Refs #25535 -- Minor edits to ForeignObject check changes.Tim Graham2015-10-141-17/+8
|
* Fixed #25535 -- Made ForeignObject checks less strict.Antoine Catton2015-10-121-0/+60
| | | | | Check that the foreign object `from_fields` are a subset of any unique constraints on the foreign model.
* Renamed descriptor classes for related objects.Aymeric Augustin2015-09-212-8/+7
| | | | | | | | | | | | 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.
* Fixed #25064 -- Allowed empty join columns.Alex Hill2015-08-153-1/+149
|
* Moved foreign_object models.py into a module.Tim Graham2015-08-145-113/+137
|
* Added test for ForeignObject.get_extra_descriptor_filter()Alex Hill2015-08-032-1/+4
|
* Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella2015-07-271-11/+26
| | | | ForeignKey/OneToOneField
* Renamed Field.rel attribute to remote_fieldAnssi Kääriäinen2015-03-251-1/+1
| | | | | | | | 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.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-062-6/+10
|
* Ensured foreign_object tests reset language properly.Preston Timmons2014-12-021-7/+8
|
* Renamed qn to compilerJosh Smeaton2014-11-161-1/+2
|