Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests/basic
Commit message (Collapse)AuthorAgeFilesLines
* Refs #21414 -- Removed Field.related per deprecation ↵Tim Graham2015-09-241-15/+0
| | | | timeline.
* Tweak some examples.Aymeric Augustin2015-08-221-13/+13
| | | | | "Area man/woman" is confusing to people not familiar with the conventions of American journalism (like me).
* Fixed #21127 -- Started deprecation toward requiring ↵Flavio Curella2015-07-281-2/+6
| | | | on_delete for ForeignKey/OneToOneField
* Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette2015-05-201-3/+4
|
* Fixed #24584 -- Fixed microsecond handling with older ↵Jon Dufresne2015-04-061-4/+19
| | | | MySQLdb
* 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.
* Fixed #24418 -- Prevented crash in refresh_from_db with ↵Claude Paroz2015-02-271-0/+7
| | | | | | | null fk Thanks Johannes Lerch for the report, Tim Graham for the test case, and Simon Charette for the review.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-7/+8
|
* Reverted "Fixed #6785 -- Made QuerySet.get() fetch a ↵Tim Graham2015-01-301-25/+1
| | | | | | | | limited number of rows." This reverts commit da79ccca1d34f427952cce4555e598a700adb8de. This optimized the unsuccessful case at the expense of the successful one.
* Fixed #24211 -- Removed ValuesQuerySet() and ↵Loic Bistuer2015-01-301-2/+1
| | | | | | ValuesListQuerySet(). Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.
* Fixed typos in code comments.Adam Taylor2015-01-201-1/+1
|
* Fixed #12663 -- Formalized the Model._meta API for ↵Daniel Pyrathon2015-01-071-1/+1
| | | | | | | retrieving fields. Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
* Fixed #21414 -- Removed RelatedObject and deprecated ↵Anssi Kääriäinen2014-12-231-0/+15
| | | | Field.related.
* Fixed #901 -- Added Model.refresh_from_db() methodAnssi Kääriäinen2014-11-281-1/+58
| | | | | Thanks to github aliases dbrgn, carljm, slurms, dfunckt, and timgraham for reviews.
* Added a comment for test of refs #20278.Anssi Kääriäinen2014-11-201-0/+2
|
* Fixed #22967 -- Made Model._do_update consistentJozef Knaperek2014-11-121-1/+1
| | | | | | Made _do_update behave more strictly according to its docs, including a corner case when specific concurent updates are executed and select_on_save is set.
* Fixed #23620 -- Used more specific assertions in the ↵Berker Peksag2014-11-031-11/+9
| | | | Django test suite.
* Refactored model lookup tests; refs #18586.Browniebroke2014-10-071-144/+134
|
* Replaced set([foo, ...]) by {foo, ...} literals. Refs PR ↵Thomas Chaumeny2014-09-281-1/+1
| | | | | | 3282. Thanks Collin Anderson for the review.
* Removed numbering from the models.py header of some test ↵Loic Bistuer2014-09-241-1/+1
| | | | | | packages. This is a reliqua from the early days of the modeltests/regressiontests era.
* assertEquals -> assertEqualTim Graham2014-07-021-2/+2
|
* Split tests.basic.ModelTests in several tests; refs #18586.zsoldosp2014-06-251-315/+161
|
* Harmonized some PEP 0263 coding preamblesClaude Paroz2014-05-151-1/+1
|
* Removed legacy transaction management per the ↵Aymeric Augustin2014-03-211-1/+0
| | | | deprecation timeline.
* Fixed many typos in comments and docstrings.Rodolfo Carvalho2014-03-031-1/+1
| | | | Thanks Piotr Kasprzyk for help with the patch.
* PEP8 cleanupJason Myers2013-11-032-16/+34
| | | | Signed-off-by: Jason Myers <jason@jasonamyers.com>
* Fix all violators of E231Alex Gaynor2013-10-261-1/+1
|
* Fixed #21298 -- Fixed E301 pep8 warningsAlasdair Nicol2013-10-231-0/+2
|
* Fixed #21288 -- Fixed E126 pep8 warningsAlasdair Nicol2013-10-211-4/+2
|
* Fixed #21287 -- Fixed E123 pep8 warningsAlasdair Nicol2013-10-181-1/+1
|
* Used "is" for comparisons with None.Tim Graham2013-10-101-2/+2
|
* Removed some more unused local varsAlex Gaynor2013-09-081-9/+9
|
* Replaced "not PY3" by "PY2", new in six 1.4.0.Aymeric Augustin2013-09-021-1/+1
|
* Fixed #20988 -- Added model meta option select_on_saveAnssi Kääriäinen2013-08-302-1/+64
| | | | | | | | | | | The option can be used to force pre 1.6 style SELECT on save behaviour. This is needed in case the database returns zero updated rows even if there is a matching row in the DB. One such case is PostgreSQL update trigger that returns NULL. Reviewed by Tim Graham. Refs #16649
* Fixed model.__eq__ and __hash__ for no pk value casesAnssi Kääriäinen2013-08-221-0/+11
| | | | | | | | | | The __eq__ method now considers two instances without primary key value equal only when they have same id(). The __hash__ method raises TypeError for no primary key case. Fixed #18864, fixed #18250 Thanks to Tim Graham for docs review.
* Made Model.__eq__ consider proxy models equivalentAnssi Kääriäinen2013-08-191-0/+4
| | | | Fixed #11892, fixed #16458, fixed #14492.
* Fixed #20826 -- Moved Manager.raw() and ↵Loic Bistuer2013-07-311-0/+2
| | | | Manager._insert() to the QuerySet class.
* 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 #20625 -- Chainable Manager/QuerySet methods.Loic Bistuer2013-07-261-0/+55
| | | | | | | | | | | Additionally this patch solves the orthogonal problem that specialized `QuerySet` like `ValuesQuerySet` didn't inherit from the current `QuerySet` type. This wasn't an issue until now because we didn't officially support custom `QuerySet` but it became necessary with the introduction of this new feature. Thanks aaugustin, akaariai, carljm, charettes, mjtamlyn, shaib and timgraham for the reviews.
* Fixed #6785 -- Made QuerySet.get() fetch a limited ↵Tim Graham2013-07-081-1/+23
| | | | | | number of rows. Thanks Patryk Zawadzki.
* Defined available_apps in relevant tests.Aymeric Augustin2013-06-101-0/+3
| | | | Fixed #20483.
* Use assertIsInstance in tests.Marc Tamlyn2013-05-211-5/+5
| | | | Gives much nicer errors when it fails.
* Fixed #20278 -- ensured .get() exceptions do not recurse ↵Anssi Kääriäinen2013-05-202-14/+18
| | | | | | | | infinitely A regression caused by d5b93d3281fe93cbef5de84a52 made .get() error reporting recurse infinitely on certain rare conditions. Fixed this by not trying to print the given lookup kwargs.
* Revert "Fixed 19895 -- Made second iteration over ↵Claude Paroz2013-03-201-6/+1
| | | | | | | | invalid queryset raise an exception too" This reverts commit 2cd0edaa477b327024e4007c8eaf46646dcd0f21. This commit was the cause of a memory leak. See ticket for more details. Thanks Anssi Kääriäinen for identifying the source of the bug.
* Fixed #16649 -- Refactored save_base logicAnssi Kääriäinen2013-03-141-2/+29
| | | | | | | | | | | | | | | | | | | 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)
* Merged regressiontests and modeltests into the test root.Florian Apolloner2013-02-263-0/+713