Commit Graph

10849 Commits

Author SHA1 Message Date
Mariusz Felisiak 8189976663 Refs #29501 -- Added test for missing dbshell executable. 2020-04-14 13:22:46 +02:00
Claude Paroz a6b4c07b6e Refs #31196 -- Installed postgis_raster extension on PostGIS 3+. 2020-04-14 09:34:01 +02:00
Ichlasul Affan 53d229ff63 Fixed #31351 -- Added system checks for partial indexes and unique constraints support. 2020-04-10 12:00:27 +02:00
Mariusz Felisiak e8d3088925 Refs #31055 -- Allowed database queries in invalid_models_tests.test_models.FieldNamesTests. 2020-04-10 11:54:14 +02:00
David Smith c8c9dbfc63 Completed test coverage for BoundField.css_classes(). 2020-04-10 07:37:54 +02:00
David Smith a350bfa6f4 Fixed #13009 -- Added BoundField.widget_type property. 2020-04-10 07:11:14 +02:00
Carlton Gibson ed274a4ae4 Fixed #31407 -- Fixed unawaited coroutine warning for Python 3.8+.
Co-authored-by: Mark Korput <dr.theman@gmail.com>
2020-04-09 12:35:19 +02:00
Daniel Hahler 377018b6ff Fixed #30779 -- Improved selection of filenames in technical 500 debug page. 2020-04-09 11:28:26 +02:00
Simon Charette 8069526ce3 Made Operation.references_model/references_field require app_label.
This will allow them to drop a ton of logic to deal with null
app_label.
2020-04-09 10:08:06 +02:00
Simon Charette 25bf15c0da Refs #22608 -- Made app_label required when optimizing migrations.
This paved the way for the removal of lot of logic when app_label was
not specified.
2020-04-09 10:08:02 +02:00
David Smith 911545da1d Increased test coverage for forms.ImageField.to_python(). 2020-04-09 08:45:31 +02:00
Carlton Gibson 4bbe8261c4 Fixed #31437 -- Corrected tests to show abstract multiple inheritance system check error.
Added minimal multiple inheritance test case showing error.
Removed obsolete diamond-inheritance case, originally added in
85ef98dc6e.
2020-04-08 20:29:48 +02:00
Mariusz Felisiak 537b0c5edf
Fixed typo in tests/backends/base/test_operations.py. 2020-04-08 20:06:31 +02:00
Carlton Gibson 94b32a20ef Refs #28184 -- Added test for FileField storage default.
Co-authored-by: miigotu <miigotu@gmail.com>
2020-04-08 11:26:17 +02:00
miigotu 210657b791 Fixed #28184 -- Allowed using a callable for FileField and ImageField storage. 2020-04-08 11:26:17 +02:00
Mariusz Felisiak db6933a032
Refs #30966 -- Added test for reloading related model state on non-relational changes.
Thanks Markus Holtermann for initial test.

Fixed in 1d16c5d562.
2020-04-08 10:43:38 +02:00
Matthijs Kooijman 4f216e4f8e Fixed #31051 -- Allowed dumpdata to handle circular references in natural keys.
Since #26291 forward references in natural keys are properly handled by
loaddata, so sorting depenencies in dumpdata doesn't need to break on
cycles. This patch allows circular references in natural keys by
breaking sort_depenencies() on loops.
2020-04-07 20:41:59 +02:00
Mark 590957a0eb
Fixed #31407 -- Adjusted test to avoid coroutine never awaited warning. 2020-04-07 20:32:54 +02:00
Matthijs Kooijman 26799c6503 Refs #26291 -- Added tests for dumpdata/loaddata with forward references without natural keys. 2020-04-07 15:40:19 +02:00
Matthijs Kooijman fca36f3c98 Refs #26291 -- Added tests for dumpdata with forward references in natural keys. 2020-04-07 15:40:14 +02:00
Matthijs Kooijman 481d8fc324 Refs #31051 -- Added test for loaddata/dumpdata with circular references without natural keys. 2020-04-07 12:01:19 +02:00
Mariusz Felisiak cf21fc9bf0
Enforced uniqueness of natural keys used in tests. 2020-04-07 10:54:19 +02:00
Simon Charette 1d16c5d562 Refs #27666 -- Ensured relationship consistency on delayed reloads.
Delayed reloads of state models broke identity based relationships
between direct and non-direct ancestors.

Basing models.Options related objects map of model labels instead of
their identity ensured relationship consistency is maintained.

Refs #30966.

Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
2020-04-07 09:20:46 +02:00
François Freitag e03eb8db93 Fixed #31428 -- Allowed empty message in management command self.stdout/err proxies. 2020-04-07 08:45:11 +02:00
David Smith 5fbc0e07a9 Completed test coverage for forms.DurationField.to_python(). 2020-04-07 06:20:43 +02:00
David Smith be9dd70931
Fixed typo in tests/forms_tests/field_tests/test_imagefield.py test names. 2020-04-07 06:04:51 +02:00
Simon Charette 513948735b Fixed #31426 -- Added proper field validation to QuerySet.order_by().
Resolve the field reference instead of using fragile regex based string
reference validation.
2020-04-06 10:19:49 +02:00
Simon Charette 98ea4f0f46 Refs #7098 -- Deprecated passing raw column aliases to order_by().
Now that order_by() has expression support passing RawSQL() can achieve
the same result.

This was also already supported through QuerySet.extra(order_by) for
years but this API is more or less deprecated at this point.
2020-04-06 10:01:02 +02:00
Hasan Ramezani 4237050684 Fixed #31420 -- Fixed crash when filtering subquery annotation against a SimpleLazyObject.
Thanks Simon Charette for the solution and analysis.
2020-04-06 07:11:29 +02:00
Hasan Ramezani 6fbce45b03 Fixed #31415 -- Fixed crash when nested OuterRef is used with operators or in database functions. 2020-04-04 20:16:00 +02:00
Matthijs Kooijman 289d0ec6fd Refs #31051 -- Fixed reloading the database with circular related objects and natural keys for tests.
Made deserialize_db_from_string() do not sort dependencies.

deserialize_db_from_string() doesn't use natural keys, so there is no
need to sort dependencies in serialize_db_to_string(). Moreover,
sorting models cause issues for circular dependencies.
2020-04-02 11:35:33 +02:00
Matthijs Kooijman 12e6f573ad Refs #26552 -- Added test for reloading the database with self-referential objects. 2020-04-02 09:17:41 +02:00
hashlash 4a6f2b63d7 Fixed #31380 -- Added deployment system check for DJANGO_ALLOW_ASYNC_UNSAFE environment variable. 2020-04-01 12:51:11 +02:00
Mariusz Felisiak 195e0cb170
Refs #31040 -- Used 402 HTTP status in middleware_exceptions tests.
HTTP status code 418 - "I'm a Teaport" was added to http.HTTPStatus in
Python 3.9.0a5 [1] that caused failures in middleware_exceptions tests.

This changes HTTP status used in middleware_exceptions tests to 402,
which exists in all supported versions of Python.

[1] https://docs.python.org/3.9/whatsnew/3.9.html#http
2020-03-31 12:09:17 +02:00
Hasan Ramezani 8aa71f4e87 Fixed #31375 -- Made contrib.auth.hashers.make_password() accept only bytes or strings. 2020-03-31 10:52:56 +02:00
Hasan Ramezani b3ab92cc5a Refs #31375 -- Added test for contrib.auth.hashers.make_password() bytes support. 2020-03-31 10:49:39 +02:00
Gordon Pendleton d0da2820ca Fixed #31402 -- Added migrate --check option.
Command exits with non-zero status if unapplied migrations exist.
2020-03-26 20:12:39 +01:00
Hasan Ramezani 55cdf6c52d Fixed #29724 -- Fixed timezone handling in ModelAdmin.date_hierarchy queries.
Thanks Alexander Holmbäck for the initial patch.
2020-03-25 21:03:41 +01:00
Alexander Holmbäck e43c34d10d Added tests for date_hierarchy template tag with models.DateTimeField. 2020-03-25 21:03:23 +01:00
Mariusz Felisiak ab5720ad80
Removed unnecessary assertions in ExpressionOperatorTests.
These tests don't modify Number.float field.
2020-03-25 13:12:32 +01:00
Adam Johnson 9e1b6b8a66 Fixed #23916 -- Allowed makemigrations to handle related model name case changes.
Made autodetector ignore related model name case changes so unnecessary
migrations are not created.
2020-03-25 10:39:34 +01:00
Hannes Ljungberg f3da09df0f Fixed #31396 -- Added binary XOR operator to F expressions. 2020-03-25 10:16:30 +01:00
Carlton Gibson 39e1c88de6
Fixed intermittent SeleniumTests.test_prepopulated_fields failure.
Element would occasionally be outside of frame.
2020-03-25 09:58:57 +01:00
Hasan Ramezani 10866a10fe Fixed #31377 -- Disabled grouping by aliases on QuerySet.values()/values_list() when they collide with field names.
Regression in fb3f034f1c.

Thanks Holovashchenko Vadym for the report.
2020-03-25 09:13:46 +01:00
Mariusz Felisiak 895f28f9cb
Reverted "Pinned asgiref == 3.2.5 in test requirements."
This reverts commit aa21020218.

Regression was fixed by
e4367c571f.
2020-03-24 20:52:05 +01:00
David Smith 27746ab28a Fixed #7664 -- Allowed customizing suffixes of MultiWidget.widgets' names. 2020-03-24 20:05:18 +01:00
Mariusz Felisiak aa21020218
Pinned asgiref == 3.2.5 in test requirements. 2020-03-24 08:52:21 +01:00
Hannes Ljungberg 0b51a4f894 Fixed #28194 -- Added support for normalization and cover density to SearchRank. 2020-03-23 11:00:55 +01:00
Adam Johnson 4ed534758c Fixed #19878 -- Deprecated TemplateView passing URL kwargs into context. 2020-03-23 08:11:14 +01:00
Tim Graham e21788121b
Added missing Meta.apps to a schema model. 2020-03-23 06:09:10 +01:00