summaryrefslogtreecommitdiff
path: root/tests/backends
AgeCommit message (Collapse)Author
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-26Fixed #19774 -- Deprecated the contenttypes.generic module.Simon Charette
It contained models, forms and admin objects causing undesirable import side effects. Refs #16368. Thanks to Ramiro, Carl and Loïc for the review.
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.
2013-05-16Fixed #20388 -- Test failures under Oracle.Shai Berger
Add "FROM DUAL" to SQL selecting constants in tests for Oracle.
2013-03-31Fixed #19220 -- Prevented decimals to be displayed in scientific notationClaude Paroz
Thanks nebstrebor for the report and antofik for the patch.
2013-03-28Fixed #19954 -- Fixed MySQL _last_executed decodingClaude Paroz
Queries can contain binary data undecodable with utf-8. In this case, using the 'replace' errors mode when decoding seems like an acceptable representation of the query. Thanks Marcel Ryser for the report.
2013-03-23Fixed #9055 -- Standardized behaviour of parameter escaping in db cursorsClaude Paroz
Previously, depending on the database backend or the cursor type, you'd need to double the percent signs in the query before passing it to cursor.execute. Now cursor.execute consistently need percent doubling whenever params argument is not None (placeholder substitution will happen). Thanks Thomas Güttler for the report and Walter Doekes for his work on the patch.
2013-03-11Ran a test that closes the database connection outside of a transaction.Aymeric Augustin
2013-03-11Improved the API of set_autocommit.Aymeric Augustin
2013-03-11Added some assertions to enforce the atomicity of atomic.Aymeric Augustin
2013-03-11Enabled autocommit for PostgreSQL.Aymeric Augustin
For users who didn't activate autocommit in their database options, this is backwards-incompatible in "non-managed" aka "auto" transaction state. This state now uses database-level autocommit instead of ORM-level autocommit. Also removed the uses_autocommit feature which lost its purpose.
2013-03-07Added a ManyToManyField(db_constraint=False) option, this allows not ↵Alex Gaynor
creating constraints on the intermediary models.
2013-02-27Fixed a test that relied on database exceptions not being wrapped.Aymeric Augustin
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner