Mariusz Felisiak
b330b918e9
Removed unused and incorrect PossessedCar.__str__() method in test_utils.
...
PossessedCar doesn't have a color.
2020-02-14 13:16:17 +01:00
Claude Paroz
cd2d508707
Removed redundant MiddlewareTest.test_old_style_request() test.
...
CurrentSiteMiddleware.process_request() is already covered by
MiddlewareTest.test_request().
2020-02-14 10:35:58 +01:00
Claude Paroz
6fba85b766
Removed unused cache.tests.CacheUtils._set_cache().
...
Unused since its introduction in 71a03e01aa
.
2020-02-13 13:53:12 +01:00
yura
54b7af7eb4
Fixed #31250 -- Ignored processing instructions in assertXMLEqual()/assertXMLNotEqual().
2020-02-13 11:03:54 +01:00
Dennis Schwertel
4070d6ceb0
Fixed #31267 -- Added tests cases with empty username or password for URLValidator.
...
Follow up to cdcf4164be
.
2020-02-13 08:32:20 +01:00
Hasan Ramezani
49275c5488
Fixed #30261 -- Prevented Form._html_output() from mutating errors if hidden fields have errors.
2020-02-13 08:12:44 +01:00
Claude Paroz
da4923ea87
Refs #27468 -- Made PasswordResetTokenGenerator use SHA-256 algorithm.
2020-02-12 21:46:56 +01:00
Claude Paroz
27f67317da
Removed unnecessary token regex in auth_tests URLs.
...
All URLs in django.contrib.auth use a "<uidb64>/<token>" pattern.
2020-02-12 10:45:53 +01:00
Abhijeet Viswa
1712a76b9d
Fixed #31246 -- Fixed locking models in QuerySet.select_for_update(of=()) for related fields and parent link fields with multi-table inheritance.
...
Partly regression in 0107e3d105
.
2020-02-11 20:43:57 +01:00
Florian Apolloner
41a3b3d186
Fixed #31240 -- Properly closed FileResponse when wsgi.file_wrapper is used.
...
Thanks to Oskar Persson for the report.
2020-02-11 20:39:12 +01:00
Florian Apolloner
549445519c
Reverted "Fixed #30565 -- Closed HttpResponse when wsgi.file_wrapper closes file-like object."
...
This reverts commit cce47ff65a
.
2020-02-11 20:39:12 +01:00
Jon Dufresne
e3f6e18513
Fixed #31253 -- Fixed data loss possibility when using caching from async code.
...
Case missed in a415ce70be
.
2020-02-11 09:09:25 +01:00
=Pratik Kumar
20ba3ce4ac
Fixed #30846 -- Made PostGIS backend respect Index's name argument.
2020-02-10 13:25:32 +01:00
Hannes Ljungberg
adcf1a7308
Fixed #31248 -- Added missing space before USING SQL on PostGIS.
2020-02-10 11:20:45 +01:00
Adam Johnson
382af9b141
Fixed #31003 -- Doc'd and tested return value of QuerySet.bulk_create().
2020-02-10 08:36:50 +01:00
Mariusz Felisiak
708c534e0b
Refs #31055 -- Fixed Model.check() call in ConstraintsTests.test_check_constraints_required_db_features().
2020-02-08 17:23:35 +01:00
Hasan Ramezani
fc4f45ebdc
Used assertRaisesMessage() in various tests.
2020-02-07 12:46:23 +01:00
Simon Charette
71756bdfed
Fixed #31055 -- Made constraint checks support databases aware.
2020-02-07 11:03:53 +01:00
Simon Charette
0b83c8cc4d
Refs #31055 -- Added --database option to the check management command.
...
This avoids enabling the ``database`` checks unless they are explicitly
requested and allows to disable on a per-alias basis which is required
when only creating a subset of the test databases.
This also removes unnecessary BaseCommand._run_checks() hook.
2020-02-07 11:01:31 +01:00
Jon Dufresne
3259983f56
Fixed #31233 -- Closed database connections and cursors after use.
2020-02-06 15:35:23 +01:00
Jon Dufresne
f48f671223
Refs #31233 -- Changed DatabaseWrapper._nodb_connection to _nodb_cursor().
...
It is now a method instead of a property and returns a context manager
that yields a cursor on entry and closes the cursor and connection upon
exit.
2020-02-06 15:29:38 +01:00
Nikita Sobolev
2d55cb5c4a
Fixed typo in tests/model_inheritance/tests.py.
2020-02-06 14:20:02 +01:00
Jon Dufresne
2905b41670
Refs #31233 -- Added "error" filter for RuntimeWarning during tests.
2020-02-06 09:46:59 +01:00
adamb70
4c6ab1f2aa
Fixed #28528 -- Allowed combining SearchVectors with different configs.
2020-02-06 07:52:50 +01:00
Adam Johnson
72b97a5b1e
Fixed #31232 -- Changed default SECURE_REFERRER_POLICY to 'same-origin'.
2020-02-05 14:39:01 +01:00
Mariusz Felisiak
7fa1a93c6c
Refs #28214 -- Added test for escaping JSONField key lookups.
...
Thanks mrsanders for the report.
Fixed in 7deeabc7c7
.
2020-02-05 14:31:30 +01:00
Hasan Ramezani
da79ee472d
Fixed #26813 -- Prevented empty choice in ModelChoiceField with RadioSelect for fields with blank=False.
2020-02-05 10:27:01 +01:00
Mariusz Felisiak
1d5fb35e6a
Refs #26813 -- Added test for ModelChoiceField.choices when using RadioSelect widget.
2020-02-05 09:21:38 +01:00
Nick Pope
335c9c94ac
Simplified imports from django.db and django.contrib.gis.db.
2020-02-04 13:20:06 +01:00
Claude Paroz
8ae84156d6
Fixed #27604 -- Used the cookie signer to sign message cookies.
...
Co-authored-by: Craig Anderson <craiga@craiga.id.au>
2020-02-04 08:05:02 +01:00
Simon Charette
eb31d84532
Fixed CVE-2020-7471 -- Properly escaped StringAgg(delimiter) parameter.
2020-02-03 08:49:13 +01:00
Mariusz Felisiak
6b178a3e93
Fixed #31217 -- Made QuerySet.values()/values_list() group by not selected annotations with aggregations used in order_by().
...
Regression in 59b4e99dd0
.
Thanks Jon Dufresne for the report and Simon Charette for the review.
2020-02-03 07:48:11 +01:00
Mariusz Felisiak
a260001a2d
Refs #30943 -- Fixed postgres_tests on PostgreSQL 9.5.
...
Bloom extension is available on PostgreSQL 9.6+.
2020-01-31 20:42:16 +01:00
Mariusz Felisiak
2e6dc72d83
Used temporary directory in FileFieldTests.test_pickle().
...
Using the current directory caused a PermissionError.
2020-01-31 20:33:48 +01:00
Claude Paroz
e7d62e97eb
Refs #22426 -- Removed pre-Django 1.5 messages compatibility code and test.
...
This reverts commit f286721f7f
.
2020-01-31 11:11:24 +01:00
Hasan Ramezani
a97111eabf
Fixed 31207 -- Prevented references to non-local remote fields in ForeignKey.to_field.
...
Thanks Simon Charette for the initial patch and review.
2020-01-31 10:19:12 +01:00
Matthias Kestenholz
4e8d89020c
Fixed #31219 -- Fixed object deletion crash for nested protected related objects.
2020-01-31 09:07:58 +01:00
Claude Paroz
8c0c0235b6
Added tests for signing non-string values and updated docs.
2020-01-30 11:58:39 +01:00
Hasan Ramezani
579f33eb79
Replaced assertWarns() with SimpleTestCase.assertWarnsMessage() in tests.
2020-01-30 11:19:50 +01:00
Hasan Ramezani
4ca5c565f4
Refs #27852 -- Fixed object deletion to show all restricted related objects rather than just the first one.
2020-01-29 09:02:23 +01:00
Jon Dufresne
f791673537
Made token tests in auth_tests use assertIs() rather than assertTrue/False().
2020-01-29 09:01:18 +01:00
Hasan Ramezani
2633c5341e
Fixed #22261 -- Fixed resolving namespaced URLs for flatpages.
2020-01-28 13:14:23 +01:00
Mariusz Felisiak
e2fab0b679
Refs #22261 -- Added missing trailing slash to the flatpages_tests urls.
2020-01-28 13:01:08 +01:00
Hannes Ljungberg
7edd06a9cf
Improved SearchVectorCombinable and SearchQueryCombinable error messages.
2020-01-27 15:09:47 +01:00
Claude Paroz
50cf183d21
Refs #27468 -- Added algorithm parameter to django.utils.crypto.salted_hmac().
2020-01-27 12:42:21 +01:00
Mariusz Felisiak
c00b863ac6
Made OnDeleteTests.test_protect() assert more specific ProtectedError.
2020-01-27 12:21:02 +01:00
Hasan Ramezani
ab3cbd8b9a
Refs #27852 -- Fixed object deletion to show all protected related objects rather than just the first one.
...
Thanks Anton Samarchyan for the initial patch.
2020-01-27 12:21:02 +01:00
Claude Paroz
e348ab0d43
Fixed #30997 -- Deprecated HttpRequest.is_ajax().
2020-01-27 08:54:32 +01:00
Claude Paroz
7fa0fa45c5
Refs #30997 -- Removed HttpRequest.is_ajax() usage.
2020-01-27 08:52:40 +01:00
Claude Paroz
d66d72f956
Refs #30997 -- Added HttpRequest.accepts().
2020-01-24 14:24:59 +01:00