Commit Graph

8664 Commits

Author SHA1 Message Date
Romain Garrigues ede59ef6f3 Fixed #27518 -- Prevented possibie password reset token leak via HTTP Referer header.
Thanks Florian Apolloner for contributing to this patch and
Collin Anderson, Markus Holtermann, and Tim Graham for review.
2017-01-13 09:17:54 -05:00
Simon Charette 91023d79ec Removed available_apps on TestCase subclasses.
TestCase subclasses are wrapped in a transaction that prevents any data from
being persisted between test runs andi thus don't require limiting the tables
to be flushed to a subset of available apps like TransactionTestCase subclasses
do.
2017-01-13 08:50:03 -05:00
Simon Charette dc1193085d Made contenttypes and auth apps unavailable when not necessary in tests. 2017-01-13 08:50:03 -05:00
Mariusz Felisiak 974d14534c Fixed #27723 -- Set MultiWidget's subwidgets input type from attrs argument.
Regression in b52c73008a.
2017-01-13 06:34:33 -05:00
Tim Graham 3226536127 Split AuthTemplateTests into test methods. 2017-01-12 13:18:49 -05:00
Peter Inglesby 0b2e5da6ed Fixed #27721 -- Added interface name to shell's IPython/bython import error. 2017-01-12 13:12:21 -05:00
Marten Kenbeek 1358a67bf9 Fixed #27713 -- Clarified NoReverseMatch error message when no view is found. 2017-01-11 21:40:18 -05:00
François Freitag f3b7c05936 Refs #16614 -- Made QuerySet.iterator() use server-side cursors on PostgreSQL.
Thanks to Josh Smeaton for the idea of implementing server-side cursors
in PostgreSQL from the iterator method, and Anssi Kääriäinen and Kevin
Turner for their previous work. Also Simon Charette and Tim Graham for
review.
2017-01-11 09:25:37 -05:00
David Sanders 53bffe8d03 Fixed #24452 -- Fixed HashedFilesMixin correctness with nested paths. 2017-01-11 09:21:29 -05:00
Ed Morley 7156a6c9c4 Fixed #27717 -- Allowed migration optimization across AlterModelOptions. 2017-01-10 18:38:48 -05:00
Mariusz Felisiak 6872ce2266 Fixed #27712 -- Reallowed Input widget's attrs argument to set the input type.
Regression in b52c73008a.
2017-01-10 11:38:27 -05:00
Adam Chainz 9daf8c43bd Fixed #26961 -- Made admin checks run when DEBUG=False. 2017-01-10 07:02:13 -05:00
Adam Chainz d57ecf40eb Fixed #27673 -- Made admin's checks run at check time instead of during registration.
Thanks Morgan Aubert for the test.
2017-01-10 07:02:13 -05:00
Raffaele Salmaso ed8c0c941d Fixed #27688 -- Made messages' add_message() request check use ducktyping. 2017-01-09 18:03:10 -05:00
Adam Chainz 7dc8d9238a Skipped unnecessary system checks in user_commands test. 2017-01-09 17:23:24 -05:00
François Freitag ee1c1c696b Made prefetch_related SQL inspection tests less brittle.
After refs #16614, integers might appear outside the WHERE clause.
2017-01-09 11:18:32 -05:00
Tim Graham 9932e1bf52 Fixed test isolation in a couple migrations tests.
Without this, tests from refs #27432 fail when running with --reverse.
2017-01-09 08:02:09 -05:00
Florian Apolloner d27643354e Require Jinja2 >= 2.9.2 in test requirements.
While our code also works with any Jinja2 >2.7,<2.9 use >2.9.2 for
simplicity reasons in the requirements file.
2017-01-08 18:43:24 +01:00
Mariusz Felisiak f8e36047da Fixed #27700 -- Optimized inspectdb tests by specifying database tables. 2017-01-07 15:41:42 -05:00
Tim Graham 853fe6f697 Pinned jinja2<2.9 in test requirements.
Kept the build green until a regression is fixed:
https://github.com/pallets/jinja/issues/640
2017-01-07 15:35:29 -05:00
Adam Chainz 334096dfac Simplified a contenttypes check test with mock. 2017-01-07 10:24:40 -05:00
Adam Chainz cd86f03591 Refs #26961 -- Fixed invalid ModelAdmins in tests. 2017-01-07 10:06:51 -05:00
Sebastian Spiegel 8b734d2f99 Fixed #27432 -- Made app_label arguments limit showmigrations --plan output. 2017-01-06 19:50:31 -05:00
Simon Charette d976760260 Fixed #27693, Refs #27257 -- Fixed iexact lookup on JSONField keys.
Thanks Harris Lapiroff for the report.
2017-01-06 19:25:32 -05:00
Tim Graham 8516f7c49b Fixed #27698 -- Added django.test.utils.ContextList.get() 2017-01-06 19:23:42 -05:00
Dmitry 12cefee5d8 Refs #15667 -- Prevented newlines in attrs.html widget rendering.
Removed the trailing newline from widget attrs.html template.
The solution may be revisited by fixing refs #9198 but not
for Django 1.11.

Thanks Dmitry Ivanchenko for the report and Preston Timmons for advice.
2017-01-06 19:11:32 -05:00
Andy Craze 97c1931c4f Fixed #24423 -- Reorganized i18n tag tests. 2017-01-06 10:33:07 -05:00
Claude Paroz 9390533951 Fixed #27696 -- Measured email long lines on encoded content
Thanks Pavel Pokrovskiy for the report and Tim Graham for the review.
2017-01-06 16:04:59 +01:00
Tim Graham 0793182694 Cosmetic edits for messages_tests. 2017-01-05 09:31:23 -05:00
Tim Graham c85831e4b7 Fixed #27658 -- Prevented collectstatic from overwriting newer files in remote storages.
Thanks revimi for the initial patch.
2017-01-04 12:50:31 -05:00
Tim Graham f60d4e704d Tested collectstatic's deleting of files/symlinks when toggling --link. 2017-01-04 12:49:57 -05:00
Tim Graham 8ea541e6a2 Refs #2856 -- Removed redundant escaping in admin's "Perhaps it was deleted?" message. 2017-01-04 10:22:17 -05:00
Tim Graham bff4abacad Refs #15035 -- Corrected a bug and improved comments for a staticfiles test. 2017-01-03 19:22:19 -05:00
anabelensc 1c12df4aa6 Fixed #25912 -- Added binary left/right shift operators to F expressions.
Thanks Mariusz Felisiak for review and MySQL advice.
2017-01-03 14:15:46 -05:00
Ketan Bhatt f0ef0c49e9 Fixed #26621 -- Corrected simplify_regex()'s handling of named capture groups. 2017-01-03 13:55:11 -05:00
Mariusz Felisiak fd2f7e4767 Fixed #27681 -- Fixed binary &/| operators for negative values on MySQL. 2017-01-03 12:41:44 -05:00
Karen Tracey 27267afc41 Fixed #2856 -- Replaced some 404s with messages in admin.
Instead of a 404, return a redirect to admin index page with a message
indicating that the requested object does not exist. This avoids the
admin returning 404 from "Recent Actions" links for deleted objects.
2017-01-03 11:31:05 -05:00
Claude Paroz 946dd5bde2 Refs #25004 -- Fixed test failure introduced by OpenLayers 3 update. 2017-01-03 11:11:00 -05:00
Tim Graham c04207cd38 Replaced some GIS has_X_method skips with supports_X_aggr/has_X_function. 2017-01-03 09:49:00 -05:00
Claude Paroz 2ebfda38e6 Fixed #25004 -- Updated OpenLayers-based widget to OpenLayers 3
Thanks Tim Graham for the review.
2017-01-02 19:45:52 +01:00
vinay karanam 6128c1736d Refs #27637 -- Fixed timesince, timeuntil on New Year's Eve in a leap year. 2017-01-02 08:40:44 -05:00
Andrew Nester 69b7d4b116 Fixed #27458 -- Fixed invalid sequence/index names when using "USER"."TABLE" db_table on Oracle. 2016-12-30 17:11:12 -05:00
Tim Martin e3f095b086 Fixed #26478 -- Made {% for %} reject invalid unpacking vars with quotes or vertical bars. 2016-12-30 09:22:40 -05:00
Tim Graham 9f16ea21c4 Used assertRaisesMessage() in {% for %} tests. 2016-12-30 09:22:04 -05:00
Tim Graham fae56427e1 Fixed #27649 -- Bumped required cx_Oracle to 5.2.
Removed obsolete workarounds from 1aa4889808
and dcf3be7a62.
2016-12-29 12:45:25 -05:00
Adam Chainz 5eff8a7783 Fixed #25415 -- Made DiscoverRunner run system checks. 2016-12-29 12:33:24 -05:00
Adam Chainz 391c450fba Refs #25415 -- Made MySQL backend skip field validation of unsupported models. 2016-12-29 12:01:48 -05:00
Anton Samarchyan 0b5d4c49d6 Fixed #27622 -- Allowed test client to accept vendor tree JSON content types. 2016-12-29 08:32:15 -05:00
Simon Charette 813805833a Fixed #27631 -- Prevented execution of transactional DDL statements when unsupported.
Executing a DDL statement during a transaction on backends that don't support
it silently commits, leaving atomic() in an incoherent state.

While schema_editor.execute() could technically be used to execute DML
statements such usage should be uncommon as these are usually performed through
the ORM. In other cases schema_editor.connection.execute() can be used to
circumvent this check.

Thanks Adam and Tim for the review.
2016-12-28 19:43:32 -05:00
Anton Samarchyan 5cf4894836 Fixed #27628 -- Fixed unarchiving a file without permission data. 2016-12-28 19:14:58 -05:00
Shivang Bharadwaj 6a74950513 Fixed #27258 -- Prohibited django.Template.render() with non-dict context.
Thanks Shivang Bharadwaj for the initial patch.
2016-12-28 16:03:20 -05:00
Tim Graham 4e89082f31 Refs #15667 -- Fixed form renderer test for Python 2 non-ASCII path. 2016-12-28 15:57:55 -05:00
Adam Chainz 6d947e8c32 Refs #25415 -- Fixed/silenced check errors in Django's test suite. 2016-12-28 15:16:10 -05:00
Tim Graham e3e80da7a5 Fixed #27651 -- Allowed M2M to concrete and proxy through model. 2016-12-28 12:48:17 -05:00
Josef Rousek aaecf038ca Fixed #27370 -- Prevented Select widget from using 'required' with a non-empty first value. 2016-12-28 10:45:22 -05:00
Mariusz Felisiak 6dbe56ed78 Fixed #27632 -- Unified query parameters by their values on Oracle. 2016-12-28 08:14:14 -05:00
Preston Timmons b52c73008a Fixed #15667 -- Added template-based widget rendering.
Thanks Carl Meyer and Tim Graham for contributing to the patch.
2016-12-27 17:50:10 -05:00
Tim Graham 51cde873d9 Fixed #27648 -- Deprecated (iLmsu) regex groups in url() patterns. 2016-12-27 15:59:13 -05:00
roboslone 544b2ef29f Fixed #27640 -- Fixed HttpResponse's __repr__() without a 'Content-Type' header. 2016-12-27 14:42:58 -05:00
Illia Volochii 4a51ba228b Fixed #27642 -- Made forms.utils.flatatt() omit 'None' values from attrs. 2016-12-27 09:42:17 -05:00
Mariusz Felisiak 3e5c5e6754 Fixed #27637 -- Fixed timesince, timeuntil in leap year edge case. 2016-12-27 09:29:11 -05:00
Simon Charette cd7efa2033 Fixed #25492 -- Checked deferred foreign key constraints before dropping them.
This allows running foreign key data and schema altering operations in the
same migration on PostgreSQL.

Thanks Tim for review.
2016-12-24 13:53:11 -05:00
Peter Inglesby a4cac17200 Fixed #27498 -- Fixed filtering on annotated DecimalField on SQLite. 2016-12-24 10:38:48 -05:00
Simon Charette 96181080ba Refs #26384 -- Isolated a test model in schema tests. 2016-12-23 21:43:49 -05:00
Adonys Alea Boffill 8ba01d1e42 Fixed #26543 -- Prevented "confirm form submission" browser prompt when reloading after an admin actions failure. 2016-12-23 17:29:24 -05:00
Tim Graham 9710677c10 Fixed typo in m2m_through_regress test methods. 2016-12-23 15:32:30 -05:00
Adam Chainz 8669cf0e68 Fixed #27626 -- Moved MEDIA_URL/STATIC_URL validation to a system check. 2016-12-23 10:55:00 -05:00
Andrey Kuzminov b8741c0058 Refs #18823 -- Corrected field name in an m2m manager error message. 2016-12-23 09:31:26 -05:00
Tim Graham 39a8843802 Used assertRaisesMessage() in m2m_through_regress tests.
The "needs to have a value for field" messages are incorrect and
reference nonexistent fields since the commit in which they were
introduced (refs #18823).
2016-12-23 09:31:26 -05:00
Adam Chainz 8fb82a315a Used @override_settings for SECURE_PROXY_SSL_HEADER tests. 2016-12-22 18:52:50 -05:00
Anton Samarchyan da79240050 Fixed #26632 -- Skipped admin.E111 list_display_links check if get_list_display() is overridden. 2016-12-22 09:32:11 -05:00
Phil Tysoe bf4516a628 Added tests for django.utils.autoreload. 2016-12-22 09:01:28 -05:00
Tim Graham 96271533d2 Moved modeladmin check tests to a separate file. 2016-12-21 17:23:57 -05:00
Tim Graham a04e795667 Wrapped an import per isort. 2016-12-21 17:05:59 -05:00
jpic bf6392bb75 Fixed #27600 -- Suppressed the REPL during shell's reading from stdin.
Thanks Adam Chainz for review and guidance.
2016-12-21 17:05:33 -05:00
Andrew Nester 24fa728a47 Fixed #27612 -- Added a check for duplicate URL instance namespaces. 2016-12-21 16:54:15 -05:00
Claude Paroz 1206d7fa57 Refs #25753 -- Reset l10n cache when format settings change
Thanks Jaap Roes for the initial patch.
2016-12-21 17:40:08 +01:00
Preston Timmons 0b4d517263 Fixed #27584 -- Fixed display of render time template errors. 2016-12-20 10:36:33 -05:00
Tim Graham e8d8fb3295 Added a test for NullBooleanField.formfield(). 2016-12-20 07:57:25 -05:00
Tim Graham c27104a9c7 Fixed #27611 -- Doc'd that CSRF_COOKIE_HTTPONLY setting offers no security. 2016-12-19 17:56:58 -05:00
Tim Graham 1a04b1762b Refs #25484 -- Made non-staticfiles {% static %} tag quote its output. 2016-12-19 16:18:06 -05:00
Tim Graham e233f357bd Refs #25484 -- Removed incorrect unquoting in {% static %}.
Regression in 374e6230ca.

Thanks Florian Apolloner for the report and analysis.
2016-12-19 16:18:06 -05:00
Mariusz Felisiak cc0bb07013 Refs #19884 -- Removed DatabaseFeatures.can_introspect_max_length.
Unused (always True) after 3e43d24ad3.
2016-12-19 16:16:11 -05:00
Tim Graham a85e84212e Refs #21221 -- Prevented {% static %} tests from using contrib.staticfiles. 2016-12-19 12:37:38 -05:00
Tim Graham 12c1d6fe8f Refs #27377 -- Fixed reverse query name clash in test model. 2016-12-19 10:10:48 -05:00
Jerome Leclanche a849ec1880 Fixed #27606 -- Fixed HttpResponseRedirect.__repr__() crash when DisallowedRedirect is raised. 2016-12-19 10:01:03 -05:00
Henry Dang 6af23a4521 Fixed #27377 -- Clarified that prepopulated_fields doesn't work with OneToOneField. 2016-12-19 08:33:46 -05:00
Mariusz Felisiak 3e43d24ad3 Refs #19884 -- Added CharField max_length introspection on Oracle. 2016-12-19 08:29:42 -05:00
alix- 374e6230ca Fixed #25484 -- Made {% static %} render escaped URLs. 2016-12-17 10:03:44 -05:00
Raphael Michel 33e86b3488 Refs #16859 -- Disabled CSRF_COOKIE_* checks when using CSRF_USE_SESSIONS. 2016-12-17 09:59:48 -05:00
Sergey Fedoseev af5983e4f5 Removed unneeded SpatiaLite workarounds in GIS tests. 2016-12-17 08:31:17 -05:00
Sergey Fedoseev 17a9e0cd07 Used assertJSONEqual() in GISFunctionsTests.test_asgeojson(). 2016-12-17 08:23:47 -05:00
Sergey Fedoseev 5d28fef8f9 Made NumPoints raise TypeError on MySQL when it's used on fields besides LineStringField. 2016-12-16 10:34:02 -05:00
Sergey Fedoseev b01ceae843 Fixed #25938 -- Factored out CPointerBase base class for GEOSBase/GDALBase. 2016-12-15 16:59:08 -05:00
Sergey Fedoseev 4884472447 Fixed #27576 -- Made get_srid_info() fallback to GDAL if SpatialRefSys is unavailable. 2016-12-15 16:36:18 -05:00
Sergey Fedoseev 986c7d522a Fixed #27497 -- Improved support of geodetic coordinates on SpatiaLite.
Area function, Distance function, and distance lookups now work with
geodetic coordinates on SpatiaLite.
2016-12-15 15:31:07 -05:00
Sergey Fedoseev 38a6df555f Fixed #27602 -- Added Oracle support for BoundingCircle GIS function. 2016-12-15 14:16:09 -05:00
Sergey Fedoseev 5a23cc00f5 Fixed #27607 -- Added Oracle support for AsGML GIS function. 2016-12-15 14:00:08 -05:00
Tim Graham f94475e526 Refs #27558 -- Isolated indexes test on MySQL.
MySQL schema changes must be done in TransactionTestCase.
2016-12-15 13:31:08 -05:00
Sergey Fedoseev d013134ffb Improved testing of num_seg kwarg of BoundingCircle GIS function. 2016-12-15 12:40:04 -05:00
David Hoffman bf84d042e0 Fixed #27582 -- Allowed HStoreField to store null values. 2016-12-15 10:35:44 -05:00
Tim Graham 412997f8ba Used assertRaisesMessage() in template_backends tests. 2016-12-15 09:32:46 -05:00
Sergey Fedoseev e36a9d3fd1 Simplified a GIS test by using an SRID available on all backends. 2016-12-15 09:32:12 -05:00
Waldemar Kornewald b24af2f405 Fixed #27418 -- Fixed occasional missing plural forms in JavaScriptCatalog. 2016-12-14 18:20:30 -05:00
Michael Scott 1e629928e9 Fixed #27313 -- Allowed overriding admin popup response template. 2016-12-14 18:10:56 -05:00
Morgan Aubert ef889d5b10 Fixed #27599 -- Fixed Field.__str__() crash for fields not attached to models. 2016-12-14 14:04:26 -05:00
Morgan Aubert adb791fdcb Moved test_field_ordering to the model_fields package. 2016-12-14 13:35:13 -05:00
Tim Graham 92c5eeac33 Fixed #27598 -- Allowed specifying directories for a filesystem template loader.
Thanks Carl Meyer for review.
2016-12-14 10:33:51 -05:00
Daniel Hillier 7da37699e8 Fixed #27594 -- Fixed select_related() with reverse self-referential OneToOneField.
Fixed definition of `klass_info['from_parent']` so that two models aren't
considered from a parent class if the model classes are the same.
2016-12-14 07:46:27 -05:00
Jon Dufresne 8db6a6c0a1 Refs #27184 -- Fixed unclosed file ResourceWarning in test_client test. 2016-12-12 12:41:38 -05:00
Simon Charette ecd625e830 Fixed #27310 -- Stopped rendering apps in RenameModel.state_forwards.
Thanks Tim for the review.
2016-12-10 10:19:06 -05:00
Mariusz Felisiak 8e3a72f4fb Fixed #27583 -- Fixed MultiValueDict.getlist() crash when values for key is None.
Restored the behavior before 727d7ce6cb.
2016-12-09 15:31:52 -05:00
Tim Graham e744c7e459 Imported specific models in a few tests that didn't. 2016-12-08 11:14:15 -05:00
Sergey Fedoseev 9b79281e31 Fixed #27472 -- Fixed GEOSGeometry('POINT EMPTY').transform crash. 2016-12-08 10:24:05 -05:00
Sergey Fedoseev a413ef2155 Refs #27472 -- Fixed OGRGeometry('POINT EMPTY').geos crash. 2016-12-08 10:24:05 -05:00
Sergey Fedoseev 65a1f32319 Refs #27472 -- Fixed GEOSGeometry('POINT EMPTY').ogr crash. 2016-12-08 10:24:05 -05:00
Yohann Gabory 47ef8f31f3 Fixed #13312 -- Allowed specifying the order of null fields in queries.
Thanks Mariusz Felisiak for finishing the patch.
2016-12-08 09:54:07 -05:00
InvalidInterrupt 98359109eb Fixed #17002 -- Allowed using a ManyToManyField through model that inherits another. 2016-12-07 17:50:51 -05:00
Tim Graham b5f0b3478d Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. 2016-12-07 17:42:31 -05:00
Sergey Fedoseev f909fa84be Fixed #25708 -- Fixed annotations with geometry values. 2016-12-07 14:16:29 -05:00
Vinay Karanam 4a246a02bd Refs #17235 -- Made MultiPartParser leave request.POST immutable. 2016-12-07 08:28:46 -05:00
Sergey Fedoseev 183f501540 Fixed #26789 -- Fixed handling of empty geometries in BaseSpatialField.get_db_prep_save(). 2016-12-06 13:58:22 -05:00
Sergey Fedoseev b90d72facf Refs #26789 -- Fixed output of WKBWriter for empty points and polygons. 2016-12-06 13:58:22 -05:00
Hiroki Kiyohara 181f492ad0 Fixed #27416 -- Prevented ModelFormSet from creating objects for invalid PKs in data. 2016-12-06 13:06:58 -05:00
Andreas Pelme 373140b07a Fixed #27567 -- Fixed crash in the debug view when request.user errors. 2016-12-06 12:28:00 -05:00
nmhung89 8f76673f34 Fixed #18729 -- Made admin changelist not use distinct() if a list_filter doesn't require it. 2016-12-06 10:38:38 -05:00
Anton Samarchyan d0112cf930 Fixed #26494 -- Made Archive.extract() preserve file permissions. 2016-12-06 08:28:36 -05:00
Sergey Fedoseev 30657d7836 Removed test workarounds for PROJ.4 < 4.7.0.
PROJ.4 4.7.0 was released on 25 Sep 2009 and is available in Ubuntu 12.04.
2016-12-05 16:23:17 -05:00
Mariusz Felisiak b059ddf066 Fixed #27561 -- Added Oracle support for binary "or" operator.
Removed DatabaseFeatures.supports_bitwise_or feature (unused, always True).
2016-12-02 16:59:39 -05:00
Tim Graham 7ed456063b Updated LimitChoicesToTests to use setUpTestData and cosmetic edits. 2016-12-02 14:46:52 -05:00
Jon Dufresne 6abd6c598e Fixed #27563 -- Moved "apply limit_choices_to" code from BaseModelForm to fields_for_model(). 2016-12-02 08:40:24 -08:00
Claude Paroz d49551bc26 Fixed #27119 -- Cached BaseFormSet.management_form property
Thanks Tim Graham for the review.
2016-12-01 20:17:25 +01:00
Ed Morley dd2e4d7b5d Refs #27558 -- Added test for no index on InnoDB ForeignKey.
The refactor in 3f76d1402d fixed the creation
of redundant indexes.

Forwardport of 82ce55dbbe from stable/1.10.x
2016-12-01 13:25:48 -05:00
Anton Samarchyan 47744a0a4e Fixed #27542 -- Made Client.force_login() skip auth backends without get_user(). 2016-12-01 09:50:08 -05:00
Keda87 794b7d8033 Refs #27546 -- Tested some __repr__() methods. 2016-12-01 08:09:38 -05:00
Tim Graham 78500102b7 Moved csrf_tests views to a spearate file. 2016-11-30 18:24:29 -05:00
Tim Graham e6262aaaf8 Refs #27358 -- Removed invalid/unneeded FileField.upload_to in tests/docs. 2016-11-30 17:05:31 -05:00
Claude Paroz cc9e429701 Fixed #27557 -- Casted GEOSGeometry only when necessary
Thanks Pete Flugstad for the report, and Tim Graham for the review.
2016-11-30 17:49:41 +01:00
Sergey Fedoseev 4464b9b9ad Fixed #27556 -- Added Oracle support for IsValid function and isvalid lookup. 2016-11-30 11:22:56 -05:00
Lex Berezhny 1a9bd75bfa Refs #27358 -- Fixed system check crash with an empty FileField.upload_to. 2016-11-30 10:07:42 -05:00
Raphael Michel ddf169cdac Refs #16859 -- Allowed storing CSRF tokens in sessions.
Major thanks to Shai for helping to refactor the tests, and to
Shai, Tim, Florian, and others for extensive and helpful review.
2016-11-30 08:57:27 -05:00
Sergey Fedoseev f24eea3b69 Simplified union GIS tests with equals() rather than equals_exact(). 2016-11-30 07:49:05 -05:00
Sergey Fedoseev 21322f9271 Fixed #27552 -- Added docs/test for GEOSGeometry.normalize(). 2016-11-30 07:39:03 -05:00
Lex Berezhny 8eb56f3c78 Fixed #27507 -- Used SchemaEditor.execute() to run deferred_sql in migrate's sync_apps(). 2016-11-29 20:00:16 -05:00
Adam Chainz 71609a5b90 Fixed #27555 -- Removed django.utils.functional.lazy_property. 2016-11-29 19:01:12 -05:00
Anton Samarchyan 05d2c5a66d Fixed #27181 -- Allowed contrib.sites to match domains with trailing ".". 2016-11-29 18:17:10 -05:00
Henry Dang 7cddd8a02e Fixed #27358 -- Added a system check to prevent FileField's upload_to from starting with a slash.
Thanks Frank Bijlsma for the initial patch.
2016-11-29 16:12:24 -05:00
Krzysztof Urbaniak b8a815e9df Fixed #27402 -- Fixed incorrect LocaleMiddleware redirects with prefix_default_language=False. 2016-11-29 13:06:35 -05:00
Andrew Nester ade52ef71f Fixed #27544 -- Fixed QuerySet.update(dt=F('dt') + timedelta) crash on SQLite. 2016-11-29 12:23:44 -05:00
Sergey Fedoseev fb3716b156 Enabled GeoQuerySetTest.test_unionagg on Oracle; refs #23504.
It's not clear when it started to work.
2016-11-29 09:06:17 -05:00
Mads Jensen aa2cb4c622 Refs #26327 -- Renamed JsonAgg to JSONBAgg.
Thanks to Christian von Roques for the report.
2016-11-28 06:57:01 -05:00
Adam Chainz 6252fd6314 Fixed #27532 -- Deprecated Model._meta.has_auto_field 2016-11-25 13:24:11 -05:00
Mariusz Felisiak d391b3a85b Refs #16682 -- Replaced signal number with equivalent signal.SIGINT. 2016-11-25 07:07:57 -05:00
Kosei Kitahara f095b249ba Fixed #27517 -- Fixed charset param in SimpleTemplateResponse.__init__(). 2016-11-24 05:56:39 -05:00
Tim Graham 93a081946d Normalized casing of "custom user model". 2016-11-23 15:14:28 -05:00
Adam Chainz e044026dce Fixed #27499 -- Made Prefetches pickle without evaluating their QuerySet. 2016-11-23 11:23:14 -05:00
Adam Chainz 7dd315a46f Added more tests for pickling Prefetches with QuerySets. 2016-11-23 11:18:34 -05:00
Mariusz Felisiak b63d0c54b0 Fixed #24959 -- Fixed queries using negative timedeltas on MySQL and Oracle. 2016-11-23 09:10:47 -05:00
Mark Young 2742901ac2 Fixed #27504 -- Allowed using the ORM after an error and rollback when autocommit is off. 2016-11-23 08:42:19 -05:00
Jackie Leng 50613d957a Fixed #26920 -- Made GEOSGeometry equality check consider the srid 2016-11-23 09:23:06 +01:00
Adam Chainz 10d49b96e6 Added tests for contrib.sitemaps.ping_google(). 2016-11-22 18:27:19 -05:00
Diego Martín abd434059e Fixed #27250 -- Removed 'for ="..."' from CheckboxSelectMultiple's <label>. 2016-11-22 11:48:37 -05:00
Quentin Fulsher f62abfc03d Fixed #27295 -- Added a system check to prohibit model names that start or end with an underscore or contain double underscores. 2016-11-22 10:14:10 -05:00
Tim Graham 41759c9082 Refs #27394 -- Removed @expectedFailure from a floatformat test. 2016-11-22 09:47:12 -05:00
Adam Chainz c70ffeeb8b Completed django.dispatch test coverage. 2016-11-22 09:07:42 -05:00
Florian Apolloner 51eaff6d35 Refs #17209 -- Fixed token verification for PasswordResetConfirmView POST requests. 2016-11-21 13:42:25 -05:00
Adam Chainz 19e2114634 Fixed #27516 -- Made test client's response.json() cache the parsed JSON. 2016-11-21 08:14:03 -05:00
Adam Chainz 9d4246419c Refs #26207 -- Removed obsolete comments about deferred model classes. 2016-11-20 18:22:13 -05:00
Adam Chainz cc1f6f26b6 Fixed #27514 -- Tested Model.__init__ excessive number of fields. 2016-11-20 13:21:59 -05:00
Nicolas Noé a269018e86 Fixed #27493 -- Fixed test failure with recent GDAL versions 2016-11-19 16:41:18 +01:00
PREMANAND 371adc472a Fixed #27156 -- Made changing HttpRequest.encoding clear GET. 2016-11-17 12:46:42 -05:00
Jonatas CD b28c6ca763 Fixed #27482 -- Doc'd an example of Case() in QuerySet.filter(). 2016-11-17 12:39:35 -05:00
Joachim Jablon 721f0ca85c Simplified a test after refs #26207. 2016-11-17 10:23:17 -05:00
Tim Graham 0d9ff873d9 Fixed #27467 -- Made UserAttributeSimilarityValidator max_similarity=0/1 work as documented.
Thanks goblinJoel for the report and feedback.
2016-11-16 17:40:37 -05:00
Simon Charette 31a56e30cf Fixed #27407 -- Made Model.delete(keep_parents=True) preserve parent reverse relationships.
Thanks Tim for the review.
2016-11-15 20:16:06 -05:00
Brandon Chinn eed6150009 Refs #27003 -- Fixed JSONField crash on converted values. 2016-11-15 18:43:55 -05:00
Brandon Chinn 6573274161 Refs #27003 -- Fixed SimpleArrayField crash on converted values. 2016-11-15 18:10:45 -05:00
Adam Chainz 7c6efb3233 Refs #26753 -- Removed obsolete workarounds in GIS tests for lack of GDAL.
Missed in f7a363ee1d.
2016-11-15 11:46:06 -05:00
Mariusz Felisiak 12f7928f5a Fixed #27394 -- Added scientific notation support for big integers in floatformat filter. 2016-11-15 09:07:15 -05:00
Mariusz Felisiak 789a02b31e Used setUpTestData() in ordering tests. 2016-11-15 08:20:22 -05:00
Carl Meyer 6e222dae56 Fixed #27453 -- Avoided unnecessary recompilation of non-translated URL regexes. 2016-11-14 18:58:23 -05:00
Carl Meyer e454db3eee Added tests for LocaleRegexProvider. 2016-11-14 18:51:02 -05:00
Ramin Farajpour Cami 0a63ef3f61 Fixed #27463 -- Fixed E741 flake8 warnings. 2016-11-14 17:40:28 -05:00
Sergey Fedoseev c7bfcd2f37 Fixed #27481 -- Made SQLite return annotated boolean values as boolean, not integer.
Thanks Simon Charette for review.
2016-11-14 14:47:20 -05:00
Ramin Farajpour Cami 967be82443 Fixed E305 flake8 warnings. 2016-11-14 12:30:46 -05:00
Tim Graham 6072de727f Decorated a few functions. 2016-11-14 12:20:44 -05:00
Christian von Roques cbae4d3184 Fixed #27448 -- Switched use of functions deprecated in PostGIS 2.2.
Thanks Claude Paroz and Tim Graham for reviews, and
Mjumbe Wawatu Poe for the initial regression test.
2016-11-12 16:18:22 -05:00
Claude Paroz 8c7778884b Dropped support for GDAL 1.7 and 1.8 2016-11-12 17:28:03 +01:00
Jacob Rief b3162cab94 Fixed #27386 -- Wrapped admin's readonly fields in <div> rather than <p>. 2016-11-12 10:02:57 -05:00
Mads Jensen a17fe73d2d Removed an unused function argument in db_functions test. 2016-11-11 17:42:34 -05:00
Mads Jensen 1446902be4 Fixed #25240 -- Added ExtractWeek and exposed it through the __week lookup.
Thanks to Mariusz Felisiak and Tim Graham for review.
2016-11-11 08:01:40 -05:00
Daniel Wiesmann 2dc07da497 Fixed #27421 -- Added shape, size, and offset controls to GDALRaster constructor.
Thanks Tim Graham for the review.
2016-11-11 07:09:38 -05:00
Kenneth Veldman 8618a7eaa1 Fixed #27431 -- Prevented disabled form fields from appearing as changed. 2016-11-11 06:57:57 -05:00
Tim Graham 7b05ffd95d Removed a bit of builtin_server tests for Python ≤ 2.7.3. 2016-11-10 22:20:09 -05:00
za 321e94fa41 Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
Tim Graham 4bb70cbcc6 Removed an obsolete (as of refs #25999) logging test from refs #18985. 2016-11-10 15:16:11 -05:00
Claude Paroz 8858631498 Fixed #27469 -- Prevented sending email to empty addresses
Thanks Jarek Glowacki for the report.
2016-11-10 19:47:02 +01:00
Paweł Marczewski 50f9e736fa Fixed #27438 -- Added the diffsettings --default option. 2016-11-10 07:50:49 -05:00
Joseph Kahn 373c6c409c Fixed #27461 -- Fixed incorrect allow_migrate() arguments in makemigrations. 2016-11-09 10:27:19 -05:00
Tom Scrace e7dfb60353 Tested the test client uploading of NamedTemporaryFile. 2016-11-09 05:40:08 -05:00
Tom Scrace 5549e89b84 Fixed #27184 -- Allowed uploading TemporaryFile with the test client.
Thanks Federico Capoano for finishing the patch.
2016-11-09 05:33:22 -05:00
Zbigniew Siciarz f94ce0d21d Fixed #27436 -- Fixed makemigrations crash when creating migrations on a separate drive than where Django is installed. 2016-11-08 18:06:17 -05:00
Marti Raudsepp b9eb267c46 Skipped makemessages -l tests when xgettext isn't installed. 2016-11-08 17:43:48 -05:00
Joachim Jablon fd78fb82d6 Fixed #27138 -- Restored pre-Python 3.6 behavior of localtime() and make_naive() on Python 3.6.
Reverted test changes in a7a7ecd2b0 and
e43ea36b76 (refs #27025).
2016-11-07 19:07:18 -05:00
Maxime Lorant cb3fb34b86 Fixed #27378 -- Added support for serialization of uuid.UUID in migrations.
Thanks Yuriy Korobko for the initial patch and Tobias McNulty for review.
2016-11-06 13:53:00 +01:00
Sven Engström f46a838efc Fixed #26812 -- Fixed APPEND_SLASH on a URL including querystring with a trailing slash. 2016-11-06 10:38:36 +01:00
Saulius Žemaitaitis f28d29e8b7 Fixed #27372 -- Fixed introspection of SQLite foreign keys with spaces in DDL.
Thanks samuller for the report and initial patch.
2016-11-06 10:13:32 +01:00
Michal Petrucha 09da1e79de Fixed #27369 -- Prevented widgets from being shared between form field instances. 2016-11-06 07:16:56 +01:00
Adam Malinowski 37809b891e Fixed #27346 -- Stopped setting the Content-Length header in ConditionalGetMiddleware. 2016-11-05 22:24:54 +01:00
Ana Balica bafc9f9c33 Fixed #27423 -- Simplified sys.exit() for indicating test failures. 2016-11-03 12:40:59 +01:00
Tim Graham 3158695365 Completed django.utils.timezone test coverage. 2016-11-01 14:01:40 -04:00
Tim Graham 7fe2d8d940 Fixed CVE-2016-9014 -- Validated Host header when DEBUG=True.
This is a security fix.
2016-11-01 09:30:57 -04:00
Andrew Nester 1ce04bcce0 Fixed #27363 -- Replaced unsafe redirect in SessionMiddleware with SuspiciousOperation. 2016-11-01 07:15:56 -04:00
Tim Graham 2f9861d823 Fixed #27148 -- Fixed ModelMultipleChoiceField crash with invalid UUID. 2016-10-31 15:21:05 -04:00
Krzysztof Urbaniak a01d887a3a Fixed #27063 -- Prevented i18n_patterns() from using too much of the URL as the language. 2016-10-31 14:32:01 -04:00
Krzysztof Urbaniak ee06689878 Added additional tests for translation's get_language_from_path(). 2016-10-31 11:55:24 -04:00
Jon Dufresne 611d34b0e4 Captured logging output during NonDjangoTemplatesDebugViewTests.test_400(). 2016-10-29 15:39:24 -07:00
Michael Scott ec9ed07488 Fixed #27188 -- Allowed using unique=True with FileField.
Thanks Tim Graham for the initial patch.
2016-10-28 20:11:03 -04:00
Tim Graham 20be1918e7 Simplified some auth_tests with assertRedirects(). 2016-10-28 11:52:52 -04:00
wim glenn 21dd792349 Fixed #26578 -- Prohibited non-ASCII digits in validate_ipv4_address. 2016-10-28 11:38:49 -04:00
Markus Holtermann 80e742d991 Added pytz to test requirements
This allows running tests w/o installing Django itself by only pointing
the Python path.
2016-10-28 15:49:07 +02:00
Mariusz Felisiak c7f86d3eec Fixed #27373 -- Corrected 404 debug page message for an empty request path. 2016-10-27 16:58:41 -04:00
Tim Graham 414ad25b09 Fixed #27327 -- Simplified time zone handling by requiring pytz. 2016-10-27 08:53:20 -04:00
Tim Graham d84ffcc22b Updated "running the tests" to use 'pip install -e'. 2016-10-27 08:18:56 -04:00
Adam Chidlow f734e2d4b2 Fixed #27334 -- Allowed FileField to move rather than copy a file.
When a FileField is set to an instance of File that is not also an
instance of FieldFile, pre_save() passes that object as the contents to
Storage.save(). This allows the file to be moved rather than copied
to the upload destination.
2016-10-26 12:25:30 -04:00
Jon Dufresne f3ea0c4bbd Reverted "Fixed #26401 -- Added BaseAuthConfig to use auth without migrations."
This reverts commit 1ec1633cb2 as it
doesn't handle ContentType's auth.Permission dependency. Thus, it
doesn't allow auth without migrations.
2016-10-25 17:32:59 -07:00
David Barragán Merino b3bd3aa07c Fixed #27385 -- Fixed QuerySet.bulk_create() on PostgreSQL when the number of objects is a multiple plus one of batch_size. 2016-10-25 19:21:08 -04:00
Alvin Lindstam 6b5106b1ce Fixed #27374 -- Made JavaScriptCatalog respect the packages argument. 2016-10-22 19:26:08 -04:00
Jon Dufresne 9b9c8c4a81 Fixed #27368 -- Modifed BaseEmailBackend.__enter__() to close the connection if an exception occurs.
Fixes unclosed socket ResourceWarning in mail test.

Thanks Claude Paroz for the review.
2016-10-21 05:59:07 -07:00
Kevin Christopher Henry 2327fad54e Fixed #27344 -- Made ConditionalGetMiddleware only process GET requests. 2016-10-17 16:11:53 -04:00
Tim Graham 61f9243e51 Fixed #27345 -- Stopped setting the Date header in ConditionalGetMiddleware. 2016-10-14 12:48:03 -04:00
Tim Graham b679a3cdb1 Tested QuerySet compatibility check.
cdfdcf4b70 missed this test.
2016-10-14 08:51:04 -04:00
Kevin Christopher Henry 9108696a75 Refs #19705 -- Changed gzip modification times to 0.
This makes gzip output deterministic, which allows
ConditionalGetMiddleware to reliably compare ETags on gzipped
content (views using the gzip_page() decorator in particular).
2016-10-14 07:41:42 -04:00
Tim Graham 4cfccc713a Tested invalid QuerySet.order_by() arguments. 2016-10-13 21:49:19 -04:00
Kevin Christopher Henry ad332e5ca9 Refs #19705 -- Made GZipMiddleware make ETags weak.
Django's conditional request processing can now produce 304 Not Modified
responses for content that is subject to compression.
2016-10-13 14:22:54 -04:00
Tim Graham cd09524f27 Fixed #27200 -- Provided makemigration's allow_migrate() with model_name. 2016-10-13 11:04:58 -04:00
Halil Kaya 2027d6acf7 Fixed #26954 -- Prevented ModelAdmin.has_module_permission()=False from blocking access to the app index page. 2016-10-13 09:11:36 -04:00
João Sampaio 74a575eb72 Fixed #24607 -- Serialized natural keys in multi-table inheritance models. 2016-10-12 20:04:57 -04:00
Claude Paroz 458e2fbfcc Fixed #27333 -- Prevented BASE64 encoding in message.as_string() on Python 3
Thanks Tim Graham for the review.
2016-10-12 20:48:09 +02:00
Kevin Christopher Henry bd7237d7ec Fixed #19705 -- Set proper headers on conditional Not Modified responses. 2016-10-12 14:43:25 -04:00
Tim Graham b2f9db1637 Removed redundant usage of assertNotIn() in a mail test.
The Content-Transfer-Encoding header won't be repeated, so checking
the header is sufficient.
2016-10-12 14:26:17 -04:00
Tim Graham e1f6eba033 Fixed nonexistent tmc.edu domain in GeoIP test.
The test was silently skipped.
2016-10-11 19:31:13 -04:00
Tim Graham d4cfeca006 Tested Model.get_next/prev_by_FIELD() on unsaved models. 2016-10-11 12:09:37 -04:00
Denis Cornehl a840710e1e Fixed #26447 -- Deprecated settings.USE_ETAGS in favor of ConditionalGetMiddleware. 2016-10-10 14:55:59 -04:00
Zach Borboa bf91be83d5 Fixed #24941 -- Added ModelAdmin.get_exclude().
Thanks Ola Sitarska for the initial patch.
2016-10-07 18:49:28 -04:00
Mads Jensen 0a26f3c338 Fixed #26327 -- Added JsonAgg to contrib.postgres.
Thanks Tim Graham for review.
2016-10-07 07:52:03 -04:00
Adam Wróbel 52188a5ca6 Fixed #27301 -- Prevented exceptions that fail unpickling from crashing the parallel test runner. 2016-10-06 15:54:38 -04:00
Claude Paroz 979ea95608 Fixed #27300 -- Made makemigrations --dry-run output a string (no bytes)
Thanks Markus Holtermann for the report and the review.
2016-10-06 11:41:35 +02:00
Tim Graham e5f5e8ac17 Refs #27218 -- Fixed LogEntry tests on MySQL 5.5. 2016-10-05 09:17:26 -04:00
Tim Graham 0083a4c8e9 Refs #18974 -- Deprecated @models.permalink() decorator. 2016-10-04 14:39:49 -04:00