summaryrefslogtreecommitdiff
path: root/tests/regressiontests/backends
AgeCommit message (Collapse)Author
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner
2013-02-25Fixed #19634 -- Added proper __hash__ methods.Aymeric Augustin
Classes overriding __eq__ need a __hash__ such that equal objects have the same hash. Thanks akaariai for the report and regebro for the patch.
2013-02-20Added a db_constraint option to ForeignKeys.Alex Gaynor
This controls whether or not a database level cosntraint is created. This is useful in a few specialized circumstances, but in general should not be used!
2013-02-18Simplified MySQL version checking.Aymeric Augustin
Django used to check the version of MySQL before handling the first request, which required: - opening a connection - closing it, to avoid holding it idle until the first request. This code isn't necessary any longer since Django dropped support for some versions of MySQL, and other database backends don't implement a similar dance. For consistency and maintenability, remove it. Reverts 4423757c0c50afbe2470434778c8d5e5b4a70925. Closes #18135.
2013-02-16Fixed #17260 -- Added time zone aware aggregation and lookups.Aymeric Augustin
Thanks Carl Meyer for the review. Squashed commit of the following: commit 4f290bdb60b7d8534abf4ca901bd0844612dcbda Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Wed Feb 13 21:21:30 2013 +0100 Used '0:00' instead of 'UTC' which doesn't always exist in Oracle. Thanks Ian Kelly for the suggestion. commit 01b6366f3ce67d57a58ca8f25e5be77911748638 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Wed Feb 13 13:38:43 2013 +0100 Made tzname a parameter of datetime_extract/trunc_sql. This is required to work around a bug in Oracle. commit 924a144ef8a80ba4daeeafbe9efaa826566e9d02 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Wed Feb 13 14:47:44 2013 +0100 Added support for parameters in SELECT clauses. commit b4351d2890cd1090d3ff2d203fe148937324c935 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Mon Feb 11 22:30:22 2013 +0100 Documented backwards incompatibilities in the two previous commits. commit 91ef84713c81bd455f559dacf790e586d08cacb9 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Mon Feb 11 09:42:31 2013 +0100 Used QuerySet.datetimes for the admin's date_hierarchy. commit 0d0de288a5210fa106cd4350961eb2006535cc5c Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Mon Feb 11 09:29:38 2013 +0100 Used QuerySet.datetimes in date-based generic views. commit 9c0859ff7c0b00734afe7fc15609d43d83215072 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:43:25 2013 +0100 Implemented QuerySet.datetimes on Oracle. commit 68ab511a4ffbd2b811bf5da174d47e4dd90f28fc Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:43:14 2013 +0100 Implemented QuerySet.datetimes on MySQL. commit 22d52681d347a8cdf568dc31ed032cbc61d049ef Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:42:29 2013 +0100 Implemented QuerySet.datetimes on SQLite. commit f6800fd04c93722b45f9236976389e0b2fe436f5 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:43:03 2013 +0100 Implemented QuerySet.datetimes on PostgreSQL. commit 0c829c23f4cf4d6804cadcc93032dd4c26b8c65e Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:41:08 2013 +0100 Added datetime-handling infrastructure in the ORM layers. commit 104d82a7778cf3f0f5d03dfa53709c26df45daad Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Mon Feb 11 10:05:55 2013 +0100 Updated null_queries tests to avoid clashing with the __second lookup. commit c01bbb32358201b3ac8cb4291ef87b7612a2b8e6 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 23:07:41 2013 +0100 Updated tests of .dates(). Replaced .dates() by .datetimes() for DateTimeFields. Replaced dates with datetimes in the expected output for DateFields. commit 50fb7a52462fecf0127b38e7f3df322aeb287c43 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:40:09 2013 +0100 Updated and added tests for QuerySet.datetimes. commit a8451a5004c437190e264667b1e6fb8acc3c1eeb Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 22:34:46 2013 +0100 Documented the new time lookups and updated the date lookups. commit 29413eab2bd1d5e004598900c0dadc0521bbf4d3 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 16:15:49 2013 +0100 Documented QuerySet.datetimes and updated QuerySet.dates.
2013-01-26Fixed #17158 -- Used a non-ambiguous representation of SQL queriesAymeric Augustin
when a correct representation cannot be obtained.
2013-01-11Fixed #19360 -- Raised an explicit exception for aggregates on date/time ↵Nick Sandford
fields in sqlite3 Thanks lsaffre for the report and Chris Medrela for the initial patch.
2013-01-08Updated deprecated test assertionsClaude Paroz
2012-12-16Made sure connections are actually closed in backends testsAnssi Kääriäinen
2012-11-27Made some tests behave nicer re connection handlingAnssi Kääriäinen
2012-10-28Fixed #18575 -- Empty DATABASES should default to dummy backendClaude Paroz
Thanks delormemarco@gmail.com for the report.
2012-10-27Fixed Oracle failure for "%" in table nameAnssi Kääriäinen
2012-10-06Removed ad-hoc support for usage of short names of built-in DB backends.Ramiro Morales
This non-standard naming was deprecated in Django 1.2.
2012-09-12Fixed #18790 -- Encoded database password on Python 2Claude Paroz
Thanks thcourbon@gmail.com for the report.
2012-09-07[py3k] Silence many warnings while running the tests.Alex Gaynor
2012-08-18Cleaned up a test slightly.Aymeric Augustin
We should catch all exceptions in the thread to ensure it doesn't die with an unhandled exception. The type of the exception is already checked further in the test.
2012-08-12[py3] Refactored __unicode__ to __str__.Aymeric Augustin
* Renamed the __unicode__ methods * Applied the python_2_unicode_compatible decorator * Removed the StrAndUnicode mix-in that is superseded by python_2_unicode_compatible * Kept the __unicode__ methods in classes that specifically test it under Python 2
2012-07-22[py3] Added Python 3 compatibility for xrange.Aymeric Augustin
2012-07-22[py3] Replaced unicode/str by six.text_type/bytes.Aymeric Augustin
2012-06-26Fixed #18465 -- Set date formats correctly on OracleJosh Smeaton
Correctly configure NLS_SESSION_PARAMETERS to format Date and DateTime on Oracle backend. Thanks to Josh Smeaton for report & patch.
2012-06-13Removed escaping test of query contentClaude Paroz
As the content of last_executed_query() is not under Django's control for most backends, it is useless to test too specific aspects of it.
2012-06-13Fixed connection.queries encoding handling on OracleAnssi Kääriäinen
In addition, removed a possibly problematic .filter() call from backends.test_query_encoding test. It is possible the .filter could cause collation problems on MySQL, and as it wasn't absolutely needed for the test it seemed better to get rid of the call. Refs #18461.
2012-06-13Fixed #18461 -- Ensured that last_executed_query returns UnicodeClaude Paroz
Thanks Anssi Kääriäinen for the review.
2012-06-09Fixed #17760 -- Implemented callable database features as cached propertiesClaude Paroz
This does remove the requirement to call features.confirm() method before checking the properties. Thanks cdestiger and Ramiro Morales for their work on the patch.
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-05-27Fixed #18135 -- Close connection used for db version checkingMichael Newman
On MySQL when checking the server version, a new connection could be created but never closed. This could result in open connections on server startup.
2012-05-18Fixed #18334 -- Fixed detection of supports_stddev backend feature.Claude Paroz
Thanks to Michael Manfre for the report and Anssi Kääriäinen for the review.
2012-05-03Replaced deprecated TestCase methods. Refs #17049.Claude Paroz
2012-04-29Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-24Fixed #17653 -- Changed MySQL backend to raise a ValueError if zero is used ↵Anssi Kääriäinen
as an AutoField value. Thanks to Sylvain Lebon for the report, krzysiumed for the patch and charettes and claudep for reviews. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-24Fixed #16961 -- Skipped resetting AUTO_INCREMENT fields for MySQL if the ↵Anssi Kääriäinen
server version is greater than 5.0.12. This allows for much faster testing. Thanks to aigarius for the report and claudep and ramiro for review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17932 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30Removed with_statement imports, useless in Python >= 2.6. Refs #17965. ↵Claude Paroz
Thanks jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-22Fixed #10320 -- Made it possible to use executemany with iterators. Thanks ↵Aymeric Augustin
MockSoul for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17387 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-07Fixed #17513 -- Prevented the MySQL backend from leaking MySQLdb-specific ↵Aymeric Augustin
exceptions. Thanks Claude Paroz. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-25Fixed #17047 -- Improved django.db.utils.load_backend to raise a better ↵Jannis Leidel
exception when using a unqualified database backend name. Thanks, Jonas Obrist. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16Ensured that thread-shareability gets validated when closing a PostgreSQL or ↵Julien Phalip
SQLite connection. Refs #17258. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16Fixed #17258 -- Moved `threading.local` from `DatabaseWrapper` to the ↵Julien Phalip
`django.db.connections` dictionary. This allows connections to be explicitly shared between multiple threads and is particularly useful for enabling the sharing of in-memory SQLite connections. Many thanks to Anssi Kääriäinen for the excellent suggestions and feedback, and to Alex Gaynor for the reviews. Refs #2879. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20Tweaked the skipping condition for the test introduced in r17128 so that it ↵Aymeric Augustin
works on non-PostgreSQL backends. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17129 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20Fixed #17062 -- Ensured that the effect of SET TIME ZONE isn't lost when the ↵Aymeric Augustin
first transation is rolled back under PostgreSQL. Thanks Anssi for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17128 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13Convert much of the regression tests to use absolute imports. There's still ↵Alex Gaynor
work to be done though. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16976 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-07Fixed #3615: Added support for loading fixtures with forward references on ↵Karen Tracey
database backends (such as MySQL/InnoDB) that do not support deferred constraint checking. Many thanks to jsdalton for coming up with a clever solution to this long-standing issue, and to jacob, ramiro, graham_king, and russellm for review/testing. (Apologies if I missed anyone else who helped here.) git-svn-id: http://code.djangoproject.com/svn/django/trunk@16590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-19Fixed #11065, #11285 -- Streamlined PostgreSQL version detection, fixing ↵Ramiro Morales
incompatibility with multi-db. Thanks findepi for the report. Changed our internal representation of the PostgreSQL version from tuples to integers as used by libpq and psycopg2. This simplifies version comparison operations. Also, using the associated libpq/psycopg2 API allows to remove the need for manually issuing in-band ``SELECT version()`` SQL queries to obtain the server version (or at least reduce its number if version of psycopg2 in use is older than 2.0.12). Refs #10509. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-10Fixed #13648 - '%s' escaping support for sqlite3 regression.Luke Plant
Thanks to master for the report and initial patch, and salgado and others for work on the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16209 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22Fixed #14091 - be more correct about logging queries in connection.queries.Jacob Kaplan-Moss
Thanks to Aymeric Augustin for figuring out how to make this work across multiple databases. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16081 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-05Fixed #13630 -- Made __init__ methods of all DB backends' DatabaseOperations ↵Ramiro Morales
classes take a `connection` argument. Thanks calexium for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02Updates to the test suite to allow for newly deprecated and removed featuresRussell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15990 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-03Added a regression test for r14781. Also fixed a bug where ↵Ian Kelly
connection.vendor was effectively always 'unknown', causing all vendor-specific tests to be skipped. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-23Fixed #14223 -- Extended unification of exception raised in presence of ↵Ramiro Morales
integrity constraint violations. The unification had been introduced in r12352 and native backend exceptions still slipped through in cases that end in connection.commit() call. Thanks Alex, Jacob and Carl for reviewing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft ↵Russell Keith-Magee
patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27Migrated custom_columns_regress doctests. Thanks to Sebastian Hillig.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13885 bcc190cf-cafb-0310-a4f2-bffc1f526a37