summaryrefslogtreecommitdiff
path: root/tests/backends/tests.py
AgeCommit message (Collapse)Author
2014-09-18Fixed #23514 -- Prevented queries in PostGISOperations initClaude Paroz
Thanks Mattia Procopio for the report.
2014-09-03Fixed #18757, #14462, #21565 -- Reworked database-python type conversionsMarc Tamlyn
Complete rework of translating data values from database Deprecation of SubfieldBase, removal of resolve_columns and convert_values in favour of a more general converter based approach and public API Field.from_db_value(). Now works seamlessly with aggregation, .values() and raw queries. Thanks to akaariai in particular for extensive advice and inspiration, also to shaib, manfre and timograham for their reviews.
2014-08-02Fixed #23144 -- Dropped support for MySQL 5.0, 5.1.Tim Graham
2014-08-01Fixed #23108 -- Dropped support for PostgreSQL 8.4 & PostGIS 1.3, 1.4.Tim Graham
Thanks Claude Paroz for the review.
2014-06-17Fixed #13711 -- Model check added to ensure that auto-generated column name ↵Anubhav Joshi
is within limits of the database. Thanks russellm for report and Tim Graham for review.
2014-06-12Silenced deprecation warnings for refs #22811 and fixed build.Tim Graham
2014-06-12Fixed #22811 -- Allowed setting both the old and new TEST database settings.Tim Graham
An ImproperlyConfigured exception will be raised they mismatch.
2014-06-07Fixed flake8 error.Tim Graham
2014-06-07Fixed test again. Refs #12581.Aymeric Augustin
2014-06-07Made a test compatible with Python 2 and 3.Aymeric Augustin
2014-06-07Fixed #3711, #6734, #12581 -- Bounded connection.queries.Aymeric Augustin
Prevented unlimited memory consumption when running background tasks with DEBUG=True. Thanks Rob, Alex, Baptiste, and others.
2014-06-05Avoided using BinaryField unecessarily in tests.Aymeric Augustin
Several database backends struggle with binary data. This change minimizes the risk of unrelated tests failures when binary fields trigger errors. Forward-port of 2e4bcb9b from stable/1.7.x.
2014-05-08Replaced vendor checks by three feature flags.Aymeric Augustin
2014-05-08Reorganized backends tests.Aymeric Augustin
This reduces the number of explicit vendor checks.
2014-04-10Fixed #21202 -- Maintained atomicity when the server disconnects.Aymeric Augustin
Thanks intgr for the report. This commit doesn't include a test because I don't know how to emulate a database disconnection in a cross-database compatible way. Also simplified a 'backends' test that was constrained by this problem.
2014-04-09Fixed #21553 -- Ensured unusable database connections get closed.Aymeric Augustin
2014-04-09Used more specific test assertions.Aymeric Augustin
2014-03-31Added test to confirm #12583 resolutionClaude Paroz
2014-03-21Removed legacy transaction management per the deprecation timeline.Aymeric Augustin
2014-03-03Fixed many typos in comments and docstrings.Rodolfo Carvalho
Thanks Piotr Kasprzyk for help with the patch.
2014-02-06Fixed #17713 -- Renamed BaseDatabaseFeatures.allows_primary_key_0 to ↵Vajrasky Kok
allows_auto_pk_0. MySQL does allow primary key with value 0. It only forbids autoincrement primary key with value 0. Thanks Claude Paroz for the report.
2014-02-02Fixed typo in 3ffeb931.Aymeric Augustin
2014-02-02Ensure cursors are closed when no longer needed.Michael Manfre
This commit touchs various parts of the code base and test framework. Any found usage of opening a cursor for the sake of initializing a connection has been replaced with 'ensure_connection()'.
2014-02-02Made SQLCompiler.execute_sql(result_type) more explicit.Michael Manfre
Updated SQLUpdateCompiler.execute_sql to match the behavior described in the docstring; the 'first non-empty query' will now include all queries, not just the main and first related update. Added CURSOR and NO_RESULTS result_type constants to make the usages more self documenting and allow execute_sql to explicitly close the cursor when it is no longer needed.
2014-01-12Fixed a test that was failing with PostGIS.Aymeric Augustin
Fixed #21452 again. Forward-port of 18d75e07 from stable/1.6.x.
2014-01-12Restored a test broken by overzealous PEP8 cleanupAymeric Augustin
2014-01-12Fixed flake8 issues.Simon Charette
2014-01-12Fixed #21452 -- Non-autocommit connections to PostgreSQL.Aymeric Augustin
When settings.DATABASES['default']['AUTOCOMMIT'] = False, the connection wasn't in autocommit mode but Django pretended it was. Thanks Anssi for analysing this issue. Refs #17062.
2014-01-12Fixed a test isolation issue. Refs #17062.Aymeric Augustin
This test could change settings.DATABASES['default']['TIME_ZONE'] and didn't restore the previous value.
2013-12-23Imported override_settings from its new location.Aymeric Augustin
2013-11-02PEP8 cleanupJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-10-23Fixed E225 pep8 warnings.Tim Graham
2013-09-28Fixed #21187 -- Import CursorWrapper from django.db.backend.utilsAnssi Kääriäinen
The import was done from util instead of utils leading to PendingDeprecationWarning.
2013-09-25Fixed #17671 - Cursors are now context managers.Michael Manfre
2013-09-16Fixed #17627 -- Renamed util.py files to utils.pyTim Graham
Thanks PaulM for the suggestion and Luke Granger-Brown and Wiktor Kołodziej for the initial patch.
2013-09-06Fixed this syntax error on py32Alex Gaynor
2013-09-06Fixed #20007 -- Configured psycopg2 to return UnicodeArraysEric Boersma
Thanks hogbait for the report.
2013-09-06Fixed #10164 -- Made AutoField increase monotonically on SQLiteChris Wilson
Thanks malte for the report.
2013-09-05Fixed #21035 -- Changed docs to treat the acronym SQL phonetically.Eric Boersma
The documentation and comments now all use 'an' to refer to the word SQL and not 'a'.
2013-08-30Fixed #20989 -- Removed useless explicit list comprehensions.Simon Charette
2013-08-02Fixed #17519 -- Fixed missing SQL constraints to proxy models.Tim Graham
Thanks thibaultj for the report, jenh for the patch, and charettes for the tests.
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-07-09Avoided transaction.set_autocommit in tests.Aymeric Augustin
It doesn't work as one might expect on a certain database backend where autocommits_when_autocommit_is_off = True. That backend happens to be popular for running tests.
2013-07-01Fixed a few more imports of django.utils.unittest.Aymeric Augustin
One import per line please! Refs #20680.
2013-06-29Fixed #18592 -- Prevented crash when accessing MySQL _last_executedClaude Paroz
Thanks reames at asymmetricventures.com for the report.
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-06-22Fixed #20587 -- Made convert_values handle None valuesGilberto Gonçalves
2013-06-10Defined available_apps in relevant tests.Aymeric Augustin
Fixed #20483.
2013-05-23Fixed #20474 -- Proxied and deprecated django.db.backendClaude Paroz
2013-05-21Use assertIsInstance in tests.Marc Tamlyn
Gives much nicer errors when it fails.