summaryrefslogtreecommitdiff
path: root/tests/raw_query
AgeCommit message (Collapse)Author
2026-08-27Fixed #37255 -- Avoided relying on implicit SELECT ordering in tests.viralpraxis
Many (~70) tests assert a specific row order for querysets whose SQL has no ORDER BY. SQL standard does not define that order. On PostgreSQL the rows usually arrive in physical storage order, which on a freshly loaded table matches insertion order -- so these assertions pass by coincidence rather than by contract. That breaks when rows are updated or deleted and the space is reused, or when the planner picks a different access path such as an index scan. A test like this can start failing with no change to Django or to the test itself. The patch made sure that most of these tests do not rely on unspecified unordered selection order.
2026-08-03Refs #28586 -- Renamed RAISE fetch mode to FETCH_RAISE.Jacob Walls
This aims for consistency in the django.db.models namespace. Thanks Natalia Bidart and Simon Charette for the idea.
2025-10-16Fixed #28586 -- Added model field fetch modes.Adam Johnson
May your database queries be much reduced with minimal effort. co-authored-by: Andreas Pelme <andreas@pelme.se> co-authored-by: Simon Charette <charette.s@gmail.com> co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2024-03-07Fixed typos in docstrings and docs.cuinix
Signed-off-by: cuinix <915115094@qq.com>
2022-04-18Fixed various tests on MySQL with MyISAM storage engine.Mariusz Felisiak
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-08-02Refs #32956 -- Corrected spelling of "gray".David Smith
2021-08-02Refs #32956 -- Corrected usage of "insure" and "assure".David Smith
2021-01-05Fixed #32231 -- Allowed passing None params to QuerySet.raw().Alexander Lyabah
2021-01-05Refs #32231 -- Added tests for QuerySet.raw() with an escaped % symbol.Alexander Lyabah
2019-11-18Fixed #30988 -- Deprecated the InvalidQuery exception.Simon Charette
It was barely documented without pointers at its defining location and was abused to prevent misuse of the QuerySet field deferring feature.
2018-04-19Fixed #29337 -- Added __len__() & __bool__() to RawQuerySet.Adnan Umer
2018-04-19Fixed #29339 -- Added result caching to RawQuerySet.Adnan Umer
2017-05-18Fixed #28206 -- Fixed RawQuerySet crash on a model with a mixed case ↵Mariusz Felisiak
db_column pk on Oracle. Thanks Tim Graham for the review.
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-12-01Refs #27546 -- Tested some __repr__() methods.Keda87
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-06-28Replaced use of TestCase.fail() with assertRaises().Tim Graham
Also removed try/except/fail antipattern that hides exceptions.
2016-06-16Fixed #26747 -- Used more specific assertions in the Django test suite.Jon Dufresne
2016-04-08Fixed E128 flake8 warnings in tests/.Tim Graham
2016-02-17Fixed flake8 typo.Tim Graham
2016-02-17Fixed #26219 -- Fixed crash when filtering by Decimal in RawQuery.Akshesh
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan
2015-09-12Fixed #23395 -- Limited line lengths to 119 characters.Dražen Odobašić
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-07-23Fixed #12768 -- Fixed QuerySet.raw() regression on FK with custom db_column.Matt Johnson
2015-03-05Converted test fixtures to setUpTestData methodsJosh Smeaton
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-08-29Fixed #23313 -- Corrected repr(RawQuery) with dict parameters.Andrew Torpedov
2014-08-14Fixed #21603 (again) -- Made a raw query in a test Oracle-compliantShai Berger
2014-08-06Fixed #21603 -- Fixed complex RawQuerySets queries on some versions of SQLite.Alex Hill
2014-07-07Fixed #22909 -- Removed camelCasing in some tests.Tim Graham
Thanks brylie.
2014-03-03Fixed many typos in comments and docstrings.Rodolfo Carvalho
Thanks Piotr Kasprzyk for help with the patch.
2013-12-14Fixed E127 pep8 warnings.Loic Bistuer
2013-12-10Fixed E124 pep8 warnings.Loic Bistuer
2013-11-02Fixing E302 ErrorsJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-10-26Fix all violators of E231Alex Gaynor
2013-08-15Fixed #20895 -- Made check management command warn if a BooleanField does ↵Alasdair Nicol
not have a default value Thanks to Collin Anderson for the suggestion and Tim Graham for reviewing the patch.
2013-07-29Removed most of absolute_import importsClaude Paroz
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
2013-06-28Support 'pyformat' style parameters in raw queries, Refs #10070Shai Berger
Add support for Oracle, fix an issue with the repr of RawQuerySet, add tests and documentations. Also added a 'supports_paramstyle_pyformat' database feature, True by default, False for SQLite. Thanks Donald Stufft for review of documentation.
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner