Commit Graph

29406 Commits

Author SHA1 Message Date
Girish Sontakke 5388ff2a52
Fixed #32582 -- Removed unnecessary dot in names of cloned test databases on SQLite. 2021-03-25 06:37:01 +01:00
Chris Jerdonek f5a2244217
Fixed typo in DiscoverRunner --reverse help text. 2021-03-24 13:39:06 +01:00
Chris Jerdonek 235d23cf99 Refs #32532 -- Added DiscoverRunner.load_tests_for_label(). 2021-03-24 13:03:53 +01:00
Mariusz Felisiak 83443e62d3
Optimized FkConstraintsTests.test_check_constraints by specifying a database table. 2021-03-24 12:18:00 +01:00
Mariusz Felisiak 94463aa861
Removed trailing whitespaces in error messages. 2021-03-24 11:44:01 +01:00
Adam Donaghy cdd0b213a8 Fixed #29606 -- Added type check for ALLOWED_HOSTS setting. 2021-03-24 09:18:44 +01:00
Nick Pope a96c730431 Fixed #32460 -- Allowed "label"/"do_not_call_in_templates" members in model choice enums. 2021-03-24 07:45:33 +01:00
Nick Pope 41e39c41c9 Refs #32460 -- Doc'd and tested that property names of model choice enums cannot be used as members. 2021-03-24 07:45:33 +01:00
Jannis Vajen 4894a97578
Fixed page numbers in Paginator.get_elided_page_range() example in docs. 2021-03-24 07:35:24 +01:00
Florian Demmer 3a185cee2a Fixed #32573 -- Fixed bounds in __iso_year lookup optimization. 2021-03-23 21:27:55 +01:00
Nick Pope 6efc35b4fe
Optimized django.utils.text.capfirst().
Unconditionally coercing to str type twice is expensive.
2021-03-23 10:45:58 +01:00
Mariusz Felisiak 2cd4026334
Refs #32353, Refs #32352 -- Fixed GIS tests with PROJ 7.X.
Different PROJ versions use different transformations, all are correct
as having a 1 meter accuracy.

These are differences in PROJ versions that cannot and should not be
handled in Django itself.

Thanks Jani Tiainen and David Smith for reports.

See: https://github.com/OSGeo/gdal/issues/3377
2021-03-23 09:16:33 +01:00
Mariusz Felisiak 71ec102b01 Fixed #32483 -- Fixed QuerySet.values()/values_list() on JSONField key transforms with booleans on SQLite.
Thanks Matthew Cornell for the report.
2021-03-23 08:28:47 +01:00
Mariusz Felisiak c4df8b86c7 Refs #32483 -- Added tests QuerySet.values()/values_list() on key transforms with structures containing booleans. 2021-03-23 08:27:14 +01:00
Mariusz Felisiak 037607ff19 Refs #31936 -- Added tests for __in lookup on JSONField key transforms with booleans. 2021-03-23 08:27:14 +01:00
Adam Johnson 562898034f Refs #31732 -- Fixed django.utils.inspect caching for bound methods.
Thanks Alexandr Artemyev for the report, and Simon Charette for the
original patch.
2021-03-22 13:17:54 +01:00
Adam Johnson ac72a216a7 Refs #31372 -- Added django.utils.inspect tests for bound methods. 2021-03-22 13:17:46 +01:00
Alex Dutton 021f946569
Updated my entry in AUTHORS. 2021-03-22 08:52:49 +01:00
tim-mccurrach cf2f6fc558
Fixed #32576 -- Corrected dumpdata docs for passing model names to the --exclude option. 2021-03-22 08:43:56 +01:00
Mariusz Felisiak 717b5e633a
Made CsrfViewMiddlewareTestMixin._get_GET_no_csrf_cookie_request() return GET requests. 2021-03-22 08:22:58 +01:00
Claude Paroz d11b9ffcc0 Fixed #32581 -- Prevented to_locale() from corrupting locale names. 2021-03-22 07:08:58 +01:00
Claude Paroz 9d130920e6 Added to_locale() tests for 3-char language codes. 2021-03-22 06:58:44 +01:00
Baptiste Mispelon 41e6b2a3c5 Fixed #32556 -- Fixed handling empty string as non-boolean attributes value by assertHTMLEqual(). 2021-03-19 20:41:57 +01:00
Baptiste Mispelon 98abf80cde Refs #32556 -- Added django.test.html.normalize_attributes(). 2021-03-19 20:41:53 +01:00
kshitijraghav d40402cfb0 Fixed #32570 -- Removed unnecessary default_auto_field in app config example. 2021-03-19 12:08:46 +01:00
Adam Donaghy e49fdfa405 Fixed #32571 -- Made CsrfViewMiddleware handle invalid URLs in Referer header. 2021-03-19 11:19:19 +01:00
Daniyal 474cc420bf Refs #32508 -- Raised Type/ValueError instead of using "assert" in django.core. 2021-03-19 08:04:37 +01:00
Mariusz Felisiak 37044817f9 Refs #25735 -- Added tags/exclude_tags arguments to DiscoverRunner docs. 2021-03-19 08:03:57 +01:00
Mariusz Felisiak f099ef3ef5 Added parallel argument to DiscoverRunner docs.
Follow up to cd9fcd4e80.
2021-03-19 08:03:57 +01:00
Mariusz Felisiak fc6fba0aa9 Corrected DiscoverRunner.build_suite() signature.
Follow up to 9012833af8.
2021-03-19 08:03:57 +01:00
Tim Graham 2411b8b5eb Fixed #16010 -- Added Origin header checking to CSRF middleware.
Thanks David Benjamin for the original patch, and Florian
Apolloner, Chris Jerdonek, and Adam Johnson for reviews.
2021-03-18 20:25:20 +01:00
Tim Graham dba44a7a7a Refs #16010 -- Required CSRF_TRUSTED_ORIGINS setting to include the scheme. 2021-03-18 20:00:22 +01:00
Hasan Ramezani 9bf5e9418f Fixed #32556 -- Fixed assertHTMLEqual() to handle empty string as boolean attributes value. 2021-03-18 16:30:15 +01:00
Adam Johnson f6713cda89 Fixed #31370 -- Added support for parallel tests with --buffer. 2021-03-18 15:30:47 +01:00
Adam Johnson e3bca22e7e Refs #31370 -- Made RemoteTestResult subclass unittest.TestResult. 2021-03-18 15:30:47 +01:00
Adam Johnson 92975bcd5f Refs #31370 -- Added test for pickling RemoteTestResult. 2021-03-18 15:30:47 +01:00
Johannes Maron 03d0f12c82 Fixed #32466 -- Corrected autocomplete to_field resolution for complex cases.
In MTI or ForeignKey as primary key cases, it is required to fetch the attname
from the field instance on the remote model in order to reliably resolve the
to_field_name.

Co-authored-by: Johannes Maron <info@johanneshoppe.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2021-03-18 11:21:23 +01:00
Johannes Maron 0b120f5d64 Refs #29138 -- Added extra tests for autocomplete FK to_field variations. 2021-03-18 11:14:18 +01:00
Hasan Ramezani ceb4b9ee68 Fixed #32547 -- Corrected notes about validation in HTML assertions docs. 2021-03-18 10:21:49 +01:00
Jonathan Richards 00b0786de5 Fixed #32548 -- Fixed crash when combining Q() objects with boolean expressions. 2021-03-17 21:53:39 +01:00
Mariusz Felisiak 54f60bc85d Refs #32548 -- Added tests for passing conditional expressions to Q(). 2021-03-17 21:53:36 +01:00
Adam Johnson 45814af619 Fixed #32560 -- Fixed test runner with --pdb and --buffer on fail/error. 2021-03-17 20:56:09 +01:00
Jozef 6993e1bf6d Fixed typo in docs/topics/testing/advanced.txt. 2021-03-17 18:10:33 +01:00
Tiago Honorato 4f4f770f77 Refs #24121 -- Added __repr__() to Origin and Template. 2021-03-17 07:49:55 +01:00
Mariusz Felisiak 065832eaec
Fixed #32353 -- Confirmed support for PROJ 7.X. 2021-03-16 20:22:35 +01:00
Daniyal 54d9179540 Refs #32508 -- Raised ImproperlyConfigured instead of using "assert" in SessionStorage. 2021-03-16 09:01:49 +01:00
Yuri Konotopov 330bc402a8 Fixed #32546 -- Avoided Meta.ordering columns in GROUP BY clauses.
Follow up to 0ddb4ebf7b.
2021-03-16 07:58:38 +01:00
Hasan Ramezani bc04941bf8 Fixed #32536 -- Added links to BaseDetailView/BaseListView.get() methods in CBV docs. 2021-03-16 07:34:07 +01:00
Hasan Ramezani 775b796d8d Refs #32508 -- Raised ValueError instead of using "assert" in lazy(). 2021-03-15 13:10:30 +01:00
Hasan Ramezani 2cd0ccef04 Added tests for AssertionErrors in get_complete_version() and _lazy_re_compile(). 2021-03-15 13:03:30 +01:00