0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00
Commit Graph

98 Commits

Author SHA1 Message Date
Riccardo Magliocchetti
3543fec3b7 Refs #12118 -- Allowed "mode=memory" in SQLite test database names. 2015-10-06 12:32:05 -04:00
Aymeric Augustin
4f6a7663bc Refs #14091 -- Fixed connection.queries on SQLite. 2015-09-17 23:01:33 +02:00
Daniel Hahler
da5747f8e4 Fixed #25400 -- Fixed regression in nonexistent features on gis backends. 2015-09-17 09:30:46 -04:00
Dražen Odobašić
b1e33ceced Fixed #23395 -- Limited line lengths to 119 characters. 2015-09-12 11:40:50 -04:00
Adam Chainz
b2f6e421a3 Fixed #25329 -- Prevented _nodb_connection from being left open 2015-09-11 08:40:43 +02:00
Aymeric Augustin
05cea7fdbb Changed database connection duplication technique.
This new technique is more straightforward and compatible with test
parallelization, where the effective database connection settings no
longer match settings.DATABASES.
2015-09-09 23:03:51 +02:00
Maxime Lorant
5153a3bfdc Fixed #25331 -- Removed trailing blank lines in docstrings. 2015-08-31 17:37:21 -04:00
Caio Ariede
ec9004728e Fixed #25175 -- Renamed the postgresql_psycopg2 database backend to postgresql. 2015-08-07 09:33:17 -04:00
Flavio Curella
c2e70f0265 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 2015-07-27 18:28:13 -04:00
Tim Graham
28ee511b7e Fixed db.utils.load_backend() on non-ASCII paths. 2015-07-17 08:21:43 -04:00
Tim Graham
bbbb7ce115 Filtered out 'base' from database backend choices error message. 2015-07-15 10:51:26 -04:00
Shai Berger
071801ccff Cleanup: Removed the try-except-fail antipattern from tests
Found cases where testing code was doing

    try:
        whatever
    except (some excption type):
        self.fail("exception shouldn't be thrown")

replaced it with just

    whatever

as this makes the unexpected errors easier to debug, and the tests
would fail just as much and aren't rendered less readable.

Thanks Markus Holtermann for review
2015-06-05 12:57:20 +03:00
Simon Charette
be67400b47 Refs #24652 -- Used SimpleTestCase where appropriate. 2015-05-20 13:46:13 -04:00
Aymeric Augustin
ed83881e64 Fixed #23820 -- Supported per-database time zone.
The primary use case is to interact with a third-party database (not
primarily managed by Django) that doesn't support time zones and where
datetimes are stored in local time when USE_TZ is True.

Configuring a PostgreSQL database with the TIME_ZONE option while USE_TZ
is False used to result in silent data corruption. Now this is an error.
2015-05-17 09:40:28 +02:00
Claude Paroz
3226050358 Fixed #24791 -- Added fallback when 'postgres' database isn't available
Thanks Carl Meyer and Tim Graham for the reviews.
2015-05-15 18:44:20 +02:00
Anssi Kääriäinen
8f30556329 Renamed Field.rel attribute to remote_field
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.
2015-03-25 08:16:12 -04:00
Tim Graham
3adc5f1ee6 Fixed #24335 -- Bumped required psycopg2 version to 2.4.5 (2.5 for contrib.postgres). 2015-02-16 18:07:27 -05:00
Aymeric Augustin
76356d963c Fixed #24318 -- Set the transaction isolation level with psycopg >= 2.4.2. 2015-02-14 18:51:11 +01:00
Collin Anderson
db77915c9f Fixed E265 comment style 2015-02-06 09:30:35 -05:00
Tim Graham
0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Josh Smeaton
8196e4bdf4 Fixed #24154 -- Backends can now check support for expressions 2015-01-27 12:20:06 +11:00
Adam Taylor
039465a6a7 Fixed typos in code comments. 2015-01-20 12:18:03 -05:00
Tim Graham
f635d75935 Removed support for old-style test database settings per deprecation timeline. 2015-01-17 09:55:18 -05:00
Tim Graham
28308078f3 Fixed #22603 -- Reorganized classes in django.db.backends. 2015-01-14 14:16:20 -05:00
Daniel Pyrathon
fb48eb0581 Fixed #12663 -- Formalized the Model._meta API for retrieving fields.
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
2015-01-06 19:25:12 -05:00
Claude Paroz
51890ce889 Applied ignore_warnings to Django tests 2014-12-30 18:16:25 +01:00
Tim Graham
c6b12bc995 Removed unused import. 2014-12-30 10:23:29 -05:00
Andriy Sokolovskiy
8c99b7920e Fixed #12118 -- Added shared cache support to SQLite in-memory testing. 2014-12-30 10:14:33 -05:00
Claude Paroz
3c5d1edb39 Fixed #22279 -- Prevented dummy backend going through DatabaseErrorWrapper
Thanks Daniel Hahler for the report and Tim Graham for the review.
2014-12-29 19:06:28 +01:00
Claude Paroz
30cbd5d360 Replaced DatabaseCreation sql methods by schema editor equivalents
Also used schema editor in migrate to sync unmigrated apps (sync_apps).
Refs #22340. Thanks Tim Graham for the review.
2014-12-23 19:35:01 +01:00
Michael Hall
895dc880eb Fixed #23812 -- Changed django.utils.six.moves.xrange imports to range 2014-12-13 12:45:58 -05:00
Josh Smeaton
267a1dcd9b Fixed #23941 -- Removed implicit decimal formatting from expressions. 2014-12-12 10:17:48 -05:00
Thomas Chaumeny
da9fe5c717 Fixed #20392 -- Added TestCase.setUpTestData()
Each TestCase is also now wrapped in a class-wide transaction.
2014-12-03 10:37:04 -05:00
Andriy Sokolovskiy
1739ae9edc Fixed #23807 -- Ignored non-digits in psycopg2 version 2014-12-01 18:42:08 -05:00
Veres Lajos
a71a2ea756 Fixed typos using https://github.com/vlajos/misspell_fixer 2014-11-03 20:59:30 -05:00
Berker Peksag
f7969b0920 Fixed #23620 -- Used more specific assertions in the Django test suite. 2014-11-03 11:56:37 -05:00
Claude Paroz
abc11b0a33 Fixed #23514 -- Prevented queries in PostGISOperations init
Thanks Mattia Procopio for the report.
2014-09-18 20:00:35 +02:00
Marc Tamlyn
e9103402c0 Fixed #18757, #14462, #21565 -- Reworked database-python type conversions
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-09-03 20:36:03 +01:00
Tim Graham
d28396f526 Fixed #23144 -- Dropped support for MySQL 5.0, 5.1. 2014-08-02 10:28:40 -04:00
Tim Graham
a9bdce7e55 Fixed #23108 -- Dropped support for PostgreSQL 8.4 & PostGIS 1.3, 1.4.
Thanks Claude Paroz for the review.
2014-08-01 10:26:00 -04:00
Anubhav Joshi
91f1b6dcdc Fixed #13711 -- Model check added to ensure that auto-generated column name is within limits of the database.
Thanks russellm for report and Tim Graham for review.
2014-06-17 16:16:02 -04:00
Tim Graham
a2cd0e12c9 Silenced deprecation warnings for refs #22811 and fixed build. 2014-06-12 09:28:36 -04:00
Tim Graham
1c58cabad7 Fixed #22811 -- Allowed setting both the old and new TEST database settings.
An ImproperlyConfigured exception will be raised they mismatch.
2014-06-12 08:17:49 -04:00
Tim Graham
6c27ff957a Fixed flake8 error. 2014-06-07 20:35:28 -04:00
Aymeric Augustin
fc31319752 Fixed test again. Refs #12581. 2014-06-07 17:16:49 +02:00
Aymeric Augustin
d98cc41a84 Made a test compatible with Python 2 and 3. 2014-06-07 15:04:06 +02:00
Aymeric Augustin
cfcca7ccce Fixed #3711, #6734, #12581 -- Bounded connection.queries.
Prevented unlimited memory consumption when running background tasks
with DEBUG=True.

Thanks Rob, Alex, Baptiste, and others.
2014-06-07 14:37:43 +02:00
Aymeric Augustin
237c229b91 Avoided using BinaryField unecessarily in tests.
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-06-05 17:11:10 +02:00
Aymeric Augustin
c70a61eb49 Replaced vendor checks by three feature flags. 2014-05-08 22:11:15 +02:00
Aymeric Augustin
d667263169 Reorganized backends tests.
This reduces the number of explicit vendor checks.
2014-05-08 21:50:21 +02:00