Commit Graph

12243 Commits

Author SHA1 Message Date
Claude Paroz ade44b8d40 Fixed settings override in mail regression tests
self.settings_override from test subclasses were overwriting parent
attribute.
2012-06-02 19:44:15 +02:00
Claude Paroz f65e412abd Fixed #18259 -- Specified that ROOT_URLCONF might be needed.
When using the template system in standalone mode and if the url
template tag is used, ROOT_URLCONF has to be defined.
Thanks techtonik for the report.
2012-06-02 11:38:23 +02:00
Ramiro Morales d4648a3446 Removed debugging code added in last commit. 2012-06-01 21:50:06 -03:00
Ramiro Morales 72130385bf Made inspectdb tests deal with a smaller generated models.py file.
Implemented this by adding a stealth table_name_filter option for the
command.
2012-06-01 21:46:07 -03:00
Aymeric Augustin 939af5a654 Fixed a typo in a comment. Refs #17742. 2012-06-01 08:09:58 +02:00
Julien Phalip 314d82a94e Merge pull request #101 from jphalip/tickets/18409-regexfield-unicode
Fixed #18409 -- Made RegexField work with unicode characters.
2012-05-31 14:40:03 -07:00
Julien Phalip f6fc83c975 Fixed #18409 -- Made RegexField work with unicode characters. 2012-05-31 11:45:35 -07:00
Jens Page ba10be7032 Fixed #18408 -- Isolated flatpages tests from existing sites.
Resolves Flatpages test issues by:
 - Creating an example_site fixture
 - Overriding project SITE_ID setting to 1
 - Normalizing the use of the hardcoded (1) site_id to settings.SITE_ID
2012-05-31 18:03:49 +02:00
Claude Paroz ea4e0aad9e Cleaned up test_client_regress tests 2012-05-31 17:43:21 +02:00
Claude Paroz 4553f51155 Moved test_client_regress tests from models.py to tests.py 2012-05-31 17:21:13 +02:00
Claude Paroz 0dc904979d Fixed #18407 -- Made model field's to_python methods fully accept unicode.
When generating error message in to_python, any unicode string
containing non-ascii characters triggered a UnicodeEncodeError for
most field types.
2012-05-31 16:46:07 +02:00
Daniel Roseman 5c59e43aef Use render shortcut in form example. 2012-05-31 15:33:45 +01:00
Claude Paroz 473c272246 Rewrote test_error_messages with helper test utility. 2012-05-31 16:24:37 +02:00
Claude Paroz 2626ea4a74 Fixed #14681 -- Do not set mode to None on file-like objects.
gzip.GzipFile does not support files with mode set to None.
2012-05-31 10:02:35 +02:00
Julien Phalip 4b28ea37e5 Merge pull request #94 from jphalip/tickets/18393-blocktrans-valueerror
Fixed #18393 -- Prevented blocktrans to crash when a variable name is badly formatted.
2012-05-29 22:47:08 -07:00
Claude Paroz 28e424532f Removed unneeded smart_str in cache utils. 2012-05-28 21:13:09 +02:00
Julien Phalip 432339a72c Fixed #18393 -- Prevented blocktrans to crash when a variable name is badly formatted. 2012-05-28 11:03:34 -07:00
Claude Paroz a535040bfa Used call_command stdout parameter to capture output in staticfiles tests. 2012-05-28 11:55:38 +02:00
Claude Paroz a768b1d94a Removed numbering of GEOS tests. 2012-05-28 11:15:31 +02:00
Claude Paroz c3b56c7cdd Used call_command in i18n compilation tests.
Now that call_command does not raise SystemExit any more, we can
use call_command again for testing compilemessages.
2012-05-27 23:11:27 +02:00
Claude Paroz cc4b4d9fd3 Used CommandError in createcachetable command.
Raising CommandError whenever a management command meets an error
condition is the standard way to handle errors in commands.
2012-05-27 23:03:21 +02:00
Claude Paroz f2b6763ad7 Fixed #18387 -- Do not call sys.exit during call_command.
Moved sys.exit(1) so as failing management commands reach it
only when running from command line.
2012-05-27 20:38:47 +02:00
Michael Newman 4423757c0c Fixed #18135 -- Close connection used for db version checking
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-27 18:45:08 +03:00
Anssi Kääriäinen a8a81aae20 Fixed #18343 -- Cleaned up deferred model implementation
Generic cleanup and dead code removal in deferred model field loading
and model.__reduce__().

Also fixed an issue where if an inherited model with a parent field
chain parent_ptr_id -> id would be deferred loaded, then accessing
the id field caused caused a database query, even if the id field's
value is already loaded in the parent_ptr_id field.
2012-05-27 18:11:13 +03:00
Claude Paroz 7a4233b69c Removed a duplicate test in fixtures_regress.
test_abort_loaddata_on_error was exactly the same test as
test_empty (error is tested in test_error_message).
2012-05-26 16:42:28 +02:00
Claude Paroz fb871f66a8 Added entry in 1.5 release notes about dumpdata improvements. 2012-05-26 16:15:45 +02:00
Claude Paroz 12f4bd74fc Removed unneeded sys import added in previous commit 2012-05-26 11:53:33 +02:00
Claude Paroz 3b5083bee5 Fixed #5423 -- Made dumpdata output one row at a time.
This should prevent storing all rows in memory when big sets of
data are dumped.
See ticket for heroic contributors.
2012-05-26 11:43:37 +02:00
Claude Paroz c2139bbcef Updated WMS URL in geoadmin test. 2012-05-26 00:02:15 +02:00
Claude Paroz 45284a90a5 Fixed #17929 -- Improved tutorial wording and capitalization.
Thanks rmattb for the report and the patch.
2012-05-25 21:49:47 +02:00
Claude Paroz ce8f874b88 Fixed #14886 -- Added wms_options dict to GeoModelAdmin.
It is now possible to set WMS options by overriding wms_options
in a subclass of GeoModelAdmin.
Thanks slinkp for the report and the initial patch.
2012-05-25 21:00:44 +02:00
Claude Paroz edfa95c22f Specified when open should use binary mode.
Thanks Vinaj Sajip for the help of his django3 branch.
2012-05-25 20:43:43 +02:00
Aymeric Augustin e73838b6dd Fixed #17371 -- Made the test client more flexible
The OPTIONS, PUT and DELETE methods no longer apply arbitrary
data encoding (in the query string or in the request body).
2012-05-25 19:03:15 +02:00
Anssi Kääriäinen 323b414441 Added tests for nested exclude/negate queries 2012-05-25 14:10:45 +03:00
Claude Paroz 2042f537a6 Removed unneeded smart_str in generic views. 2012-05-24 23:55:50 +02:00
Anssi Kääriäinen 8c72aa2379 Fixed qs.order_by() join promotion for already existing joins
When order_by causes new joins to be added to the query, the joins must
be LEFT OUTER joins for nullable relations, otherwise the order_by
could cause the results to be altered. This commit fixes the logic to
only promote new joins, previously all joins in the order_by lookup
path were promoted.

Thanks to Bruno Desthuilliers for spotting this corner case.
2012-05-24 18:42:06 +03:00
Claude Paroz 2daf1ae8b9 Stopped converting match dict keys to bytestrings when resolving URLs.
Test suite is passing, but if any regression would be detected,
we might replace smart_str by force_unicode.
2012-05-24 13:51:18 +02:00
Aymeric Augustin 1e6c3368f2 Fixed #18177 -- Cached known related instances.
This was recently fixed for one-to-one relations; this patch adds
support for foreign keys. Thanks kaiser.yann for the report and
the initial version of the patch.
2012-05-24 13:25:01 +02:00
Aymeric Augustin 3b2993ed04 Fixed #18353 -- Inconsistency in date-based CBVs. 2012-05-24 13:02:19 +02:00
Claude Paroz f4abba5200 Fixed #18367 -- Allowed LayerMapping to store strings in TextField.
Thanks geoffhing@gmail.com for the report.
2012-05-24 09:57:22 +02:00
Claude Paroz f1ebcdc7c2 Modernized contrib.gis layermapping tests.
In particular, make tests independent of each other.
2012-05-24 09:52:06 +02:00
Claude Paroz 817535d73e Replaced types.NoneType occurrences
In Python 3, types.NoneType is no more available.
2012-05-23 12:20:03 +02:00
Anssi Kääriäinen 0df4593f0e Fixed #18319 -- Added 'supports_sequence_reset' DB feature
Added a new feature to allow 3rd party backends to skip tests which
test sequence resetting.

Thanks to manfre for report and patch.
2012-05-22 23:51:05 +03:00
Anssi Kääriäinen 8ee1a664f9 Fixed #18318 -- Changed some tests to be 3rd party DB friendly
Thanks to manfre for report and patch.
2012-05-22 23:33:42 +03:00
Anssi Kääriäinen 459c3b67b7 Fixed #18317 -- Removed db specific raw SQL function from tests
A test in model_fields used LEN() in raw SQL. This function is not
available on some 3rd party backends. I removed this function and
ensured that the test works correctly (breaks pre e9bbdb39de) with
the change.
2012-05-22 23:16:24 +03:00
Claude Paroz df7a65ac4b Replaced 'next' testing by collections.Iterator testing.
The new construct is also Python 3 compatible (where 'next' has
been renamed to '__next__').
2012-05-22 20:37:38 +02:00
Anssi Kääriäinen d5c7f9efc3 Fixed #18304 -- Optimized save() when update_can_self_select=False
Databases with update_can_self_select = False (MySQL for example)
generated non-necessary queries when saving a multitable inherited
model, and when the save resulted in update.
2012-05-22 20:59:33 +03:00
Claude Paroz 6219591f2e Fixed #18244 -- Documented that formset.has_changed is a 1.4 addition. 2012-05-22 13:56:03 +02:00
Claude Paroz 115d522c84 Fixed #18167 -- Gave advice on checking Django version in the tutorial.
Thanks smuss for the initial patch.
2012-05-22 13:43:58 +02:00
Claude Paroz cafa5bf4f4 Replaced print statement by print function in new install instructions. 2012-05-22 13:22:45 +02:00