Jon Dufresne
e0e88ceaaa
Refs #30116 -- Simplified stdout/stderr decoding with subprocess.run()'s encoding argument.
...
The encoding argument has been available since Python 3.6.
https://docs.python.org/3/library/subprocess.html#subprocess.run
2019-11-04 11:21:25 +01:00
Jon Dufresne
607004f81a
Simplified consecutive calls to pathlib.Path.parent.
2019-11-04 09:59:34 +01:00
Carlton Gibson
2d38eb0ab9
Fixed #30931 -- Restored ability to override Model.get_FIELD_display().
...
Thanks Sergey Fedoseev for the implementation idea.
Regression in a68ea23101
.
2019-11-04 07:55:34 +01:00
Hasan Ramezani
8463390527
Refs #27808 -- Added test for saving nested ArrayField with nullable base field.
2019-11-01 15:56:21 +01:00
Sky
3cf907c20c
Fixed #30761 -- Prevented floatformat filter from returning a negative zero.
2019-10-31 10:48:35 +01:00
Sky
459de8dc29
Added more tests for floatformat filter with negative values.
2019-10-31 10:07:59 +01:00
Hasan Ramezani
17752003a8
Refs #28428 -- Made FileSystemStorage.save() to support pathlib.Path.
2019-10-31 09:06:05 +01:00
Hasan Ramezani
0f2975534d
Refs #28428 -- Added tests for using FileSystemStorage with pathlib.Path.
2019-10-31 08:52:15 +01:00
Felipe Lee
c2c27867ef
Refs #20456 -- Moved initialization of HEAD method based on GET to the View.setup() for generic views.
...
This will ease unit testing of views since setup will essentially do
everything needed to set the view instance up (other than instantiating
it). Credit for idea goes to Vincent Prouillet.
2019-10-30 14:43:52 +01:00
Felipe Lee
31d1822532
Refs #20456 -- Added test for initialization of request/args/kwargs attributes in View.Setup().
2019-10-30 14:43:47 +01:00
Hasan Ramezani
6315a272c5
Refs #28428 -- Made filepath_to_uri() support pathlib.Path.
2019-10-30 13:13:15 +01:00
Nick Pope
7552de7866
Used more specific unittest assertions in tests.
...
* assertIsNone()/assertIsNotNone() instead of comparing to None.
* assertLess() for < comparisons.
* assertIs() for 'is' expressions.
* assertIsInstance() for isinstance() expressions.
* rounding of assertAlmostEqual() for round() expressions.
* assertIs(..., True/False) instead of comparing to True/False.
* assertIs()/assertIsNot() for ==/!= comparisons.
* assertNotEqual() for == comparisons.
* assertTrue()/assertFalse() instead of comparing to True/False.
2019-10-29 12:37:30 +01:00
Erwin Junge
a6cb8ec389
Fixed #30922 -- Fixed ModelAdmin.date_hierarchy queries with DST changes.
...
There was an issue where admin date_hierarchy didn't render last day of
a month in DST-switch month.
2019-10-29 11:21:03 +01:00
Hasan Ramezani
6c6d24a4fe
Refs #30908 -- Added test for nonexistent path in forms.FilePathField.
2019-10-29 08:39:56 +01:00
Hasan Ramezani
52cb419072
Fixed #30918 -- Made timesince()/timeuntil() respect custom time strings for future and the same datetimes.
2019-10-28 12:28:18 +01:00
Pavel Dedik
711a7d4d50
Fixed #30907 -- Fixed SplitArrayField.has_changed() with removal of empty trailing values.
2019-10-28 10:32:34 +01:00
Pavel Dedik
d95b1ddcbe
Refs #30907 -- Added more tests for SplitArrayField.has_changed().
2019-10-28 10:32:05 +01:00
Sergey Fedoseev
6bbf9a20e2
Fixed #29770 -- Added LinearRing.is_counterclockwise property.
2019-10-25 14:28:26 +02:00
Carlton Gibson
24e540fbd7
Fixed #29087 -- Added delete buttons for unsaved admin inlines on validation error.
2019-10-25 13:28:08 +02:00
Carlton Gibson
dbcd7b064e
Fixed #30902 -- Added __str__() for model choice enums.
...
Allows expected behavior when cast to str, also matching behaviour of
created instances with those fetched from the DB.
Thanks to Simon Charette, Nick Pope, and Shai Berger for reviews.
2019-10-25 09:19:56 +02:00
Nick Pope
55df1750be
Refs #30897 -- Added support for ANALYZE option to Queryset.explain() on MariaDB and MySQL 8.0.18+.
2019-10-24 15:13:26 +02:00
Nick Pope
742961332e
Refs #30897 -- Added support for TREE format to Queryset.explain() on MySQL 8.0.16+.
2019-10-24 15:13:23 +02:00
Simon Charette
7acef095d7
Fixed #23576 -- Implemented multi-alias fast-path deletion in MySQL backend.
...
This required moving the entirety of DELETE SQL generation to the
compiler where it should have been in the first place and implementing
a specialized compiler on MySQL/MariaDB.
The MySQL compiler relies on the "DELETE table FROM table JOIN" syntax
for queries spanning over multiple tables.
2019-10-24 12:24:53 +02:00
Carlton Gibson
e83c300a33
Fixed #30900 -- Skipped async-related tests on Windows using Python 3.8.0.
...
Refs https://bugs.python.org/issue38563 .
2019-10-24 10:43:05 +02:00
Hannes Ljungberg
fa5f3291e7
Fixed #30903 -- Fixed migrations crash on PostgreSQL when adding Index with opclasses and ordering.
2019-10-24 09:33:14 +02:00
Mariusz Felisiak
25903e41fb
Refs #29926 -- Bumped minimum tblib version to 1.5.0 in test requirements.
2019-10-23 15:26:04 +02:00
Mariusz Felisiak
e10ebf43e1
Bumped minimum Pillow version to 6.2.0 in test requirements.
...
Pillow < 6.2.0 is vulnerable to CVE-2019-16865.
2019-10-23 15:07:06 +02:00
Nick Pope
6e9189c080
Refs #30897 -- Added test for SETTINGS option to Queryset.explain() on PostgreSQL 12+.
2019-10-23 14:07:18 +02:00
Nick Pope
a5c5ae7d91
Refs #28574 -- Used feature flag for PostgreSQL version check.
2019-10-23 14:07:13 +02:00
Dan Moore
bc94e3c1a2
Fixed #29919 -- Fixed RelatedOnlyFieldListFilter crash with reverse relationships.
2019-10-23 10:50:31 +02:00
Dan Moore
f3855a8d2d
Added tests for Field.get_choices()'s limit_choices_to argument.
2019-10-23 10:47:17 +02:00
Sergey Fedoseev
d4e767911f
Added tests for middlewares' checks.
2019-10-23 08:18:02 +02:00
Mariusz Felisiak
2847d2c760
Refs #29926 -- Skipped RemoteTestResultTest.test_add_failing_subtests() on Python 3.8+ and tblib <= 1.4.0.
2019-10-22 15:34:19 +02:00
Alex Aktsipetrov
681f7e2b13
Fixed #20577 -- Deferred filtering of prefetched related querysets.
...
Added internal interface to QuerySet that allows to defer next filter
call till .query is accessed. Used it to optimize prefetch_related().
Thanks Simon Charette for the review.
2019-10-21 13:21:54 +02:00
Ahmet Kucuk
09578f6dfb
Fixed #30827 -- Made batch_size arg of QuerySet.bulk_create() respect DatabaseOperations.bulk_batch_size().
...
Thanks Chetan Khanna for tests.
2019-10-21 11:46:44 +02:00
André Ericson
3120490912
Fixed #30876 -- Moved classproperty() decorator to the django.utils.functional.
2019-10-21 09:57:39 +02:00
André Ericson
31174031f1
Fixed #30841 -- Deprecated using non-boolean values for isnull lookup.
2019-10-21 08:44:20 +02:00
Jon Dufresne
2f72480fbd
Replaced deprecated assertEquals() with assertEqual().
2019-10-21 07:52:17 +02:00
Pavel Savchenko
1711c509fa
Fixed #27391 -- Implemented SimpleTestCase.debug().
...
debug() should bubbled up exceptions if occurring in test, but behave
the same as run() when no exceptions occurred.
2019-10-18 12:22:51 +02:00
Pavel Savchenko
dc8cd2fefd
Refs #27391 -- Added more tests for SimpleTestCase.
2019-10-18 11:11:34 +02:00
Patrick Jenkins
46e74a5256
Fixed #28337 -- Preserved extra headers of requests made with django.test.Client in assertRedirects().
...
Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
2019-10-18 08:42:51 +02:00
Daniel Musketa
3ca9df51c7
Fixed typo in tests/admin_scripts/tests.py.
2019-10-18 07:50:59 +02:00
Mariusz Felisiak
3a8af298b9
Fixed #30890 -- Added MariaDB support for the relate lookup.
2019-10-18 07:46:31 +02:00
Mariusz Felisiak
bebf61de11
Added gis_tests.utils.mariadb hook.
2019-10-18 07:46:31 +02:00
Hasan Ramezani
ef4beafa2c
Refs #28816 -- Prevented silencing data loss when decreasing CharField.max_length for ArrayField.base_field on PostgreSQL.
2019-10-17 12:50:53 +02:00
sage
6f82df69ef
Refs #12990 -- Moved CheckFieldDefaultMixin to the django.db.models.fields.mixins.
2019-10-17 12:30:29 +02:00
Mariusz Felisiak
1877ec1875
Refs #27910 -- Added __init__.py file for model_enums tests.
2019-10-15 21:27:22 +02:00
Carlton Gibson
1de9a92295
Fixed #30872 -- Improved unknown command message when settings are manually configured.
2019-10-15 13:04:32 +02:00
Mariusz Felisiak
06d34aab7c
Fixed #30870 -- Fixed showing that RunPython operations are irreversible by migrate --plan.
...
Thanks Hasan Ramezani for the initial patch and Kyle Dickerson for the
report.
2019-10-14 11:13:27 +02:00
Mariusz Felisiak
05186c03a3
Isolated migrations.test_commands.MigrateTests.test_migrate_plan.
2019-10-14 08:42:38 +02:00