Commit Graph

17669 Commits

Author SHA1 Message Date
Girish Sontakke 5388ff2a52
Fixed -- 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 -- Added DiscoverRunner.load_tests_for_label(). 2021-03-24 13:03:53 +01:00
Mariusz Felisiak 94463aa861
Removed trailing whitespaces in error messages. 2021-03-24 11:44:01 +01:00
Adam Donaghy cdd0b213a8 Fixed -- Added type check for ALLOWED_HOSTS setting. 2021-03-24 09:18:44 +01:00
Nick Pope a96c730431 Fixed -- Allowed "label"/"do_not_call_in_templates" members in model choice enums. 2021-03-24 07:45:33 +01:00
Florian Demmer 3a185cee2a Fixed -- 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 71ec102b01 Fixed -- 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
Adam Johnson 562898034f Refs -- 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
Claude Paroz d11b9ffcc0 Fixed -- Prevented to_locale() from corrupting locale names. 2021-03-22 07:08:58 +01:00
Baptiste Mispelon 41e6b2a3c5 Fixed -- Fixed handling empty string as non-boolean attributes value by assertHTMLEqual(). 2021-03-19 20:41:57 +01:00
Baptiste Mispelon 98abf80cde Refs -- Added django.test.html.normalize_attributes(). 2021-03-19 20:41:53 +01:00
Adam Donaghy e49fdfa405 Fixed -- Made CsrfViewMiddleware handle invalid URLs in Referer header. 2021-03-19 11:19:19 +01:00
Daniyal 474cc420bf Refs -- Raised Type/ValueError instead of using "assert" in django.core. 2021-03-19 08:04:37 +01:00
Tim Graham 2411b8b5eb Fixed -- 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 -- Required CSRF_TRUSTED_ORIGINS setting to include the scheme. 2021-03-18 20:00:22 +01:00
Hasan Ramezani 9bf5e9418f Fixed -- Fixed assertHTMLEqual() to handle empty string as boolean attributes value. 2021-03-18 16:30:15 +01:00
Adam Johnson f6713cda89 Fixed -- Added support for parallel tests with --buffer. 2021-03-18 15:30:47 +01:00
Adam Johnson e3bca22e7e Refs -- Made RemoteTestResult subclass unittest.TestResult. 2021-03-18 15:30:47 +01:00
Johannes Maron 03d0f12c82 Fixed -- 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
Hasan Ramezani ceb4b9ee68 Fixed -- Corrected notes about validation in HTML assertions docs. 2021-03-18 10:21:49 +01:00
Jonathan Richards 00b0786de5 Fixed -- Fixed crash when combining Q() objects with boolean expressions. 2021-03-17 21:53:39 +01:00
Adam Johnson 45814af619 Fixed -- Fixed test runner with --pdb and --buffer on fail/error. 2021-03-17 20:56:09 +01:00
Tiago Honorato 4f4f770f77 Refs -- Added __repr__() to Origin and Template. 2021-03-17 07:49:55 +01:00
Daniyal 54d9179540 Refs -- Raised ImproperlyConfigured instead of using "assert" in SessionStorage. 2021-03-16 09:01:49 +01:00
Yuri Konotopov 330bc402a8 Fixed -- Avoided Meta.ordering columns in GROUP BY clauses.
Follow up to 0ddb4ebf7b.
2021-03-16 07:58:38 +01:00
Hasan Ramezani 775b796d8d Refs -- Raised ValueError instead of using "assert" in lazy(). 2021-03-15 13:10:30 +01:00
Chris Jerdonek 7bdd09d016 Fixed -- Optimized DiscoverRunner.build_suite() by calling find_top_level() only if is_discoverable() is true. 2021-03-15 10:15:21 +01:00
Chris Jerdonek d5a214c7c4 Refs -- Added django.test.runner.find_top_level(). 2021-03-15 10:15:21 +01:00
manav014 99640e24b4 Fixed -- Improved naming of migrations with multiple operations.
52 gives 60 in total (52 + 5 + 3).

Co-authored-by: Adam Johnson <me@adamj.eu>
2021-03-12 11:56:12 +01:00
Adam Johnson b1cb923883 Refs , Refs -- Made makemigrations always name initial migrations "initial". 2021-03-12 09:19:23 +01:00
Chris Jerdonek 551b0f94bf
Reduced nesting inside DiscoverRunner.build_suite(). 2021-03-12 08:06:29 +01:00
Chris Jerdonek d828beb68f Fixed -- Delayed creating a test suite in build_suite(). 2021-03-11 10:02:06 +01:00
Chris Jerdonek d8a4bcffdb Refs -- Doc'd and tested iter_test_cases() support for an iterable of tests. 2021-03-11 09:23:33 +01:00
Hasan Ramezani a2d5ea626e Refs -- Raised ImproperlyConfigured instead of using "assert" in middlewares. 2021-03-11 08:34:28 +01:00
Jonny Park dc86a25a67 Refs -- Added __repr__() to MiddlewareMixin and subclasses. 2021-03-10 21:16:58 +01:00
Claude Paroz bc43ae7c13
Refs -- Improved assertQuerysetEqual() warning message with stacklevel=2. 2021-03-10 16:09:05 +01:00
mimi89999 0df5c8187a Fixed -- Fixed admin dark theme for autocomplete fields. 2021-03-10 11:16:03 +01:00
Nick Pope afb0eb8bb3
Refs -- Added __repr__() to OrderedSet. 2021-03-10 09:29:05 +01:00
Mariusz Felisiak ba9a2b7544
Refs -- Raised TypeError instead of using "assert" on unsupported operations for sliced querysets. 2021-03-10 09:16:28 +01:00
Mariusz Felisiak 6f5dbe9dbe
Refs -- Corrected color variable for toggle links in admin.
Follow up to cd3019bc10.
2021-03-09 18:38:07 +01:00
Mariusz Felisiak 781acf0987
Refs -- Used --darkened-bg for <pre> elements. 2021-03-09 18:34:25 +01:00
Chris Jerdonek 77e0a35a10 Fixed -- Fixed reorder_suite() with duplicates and reverse=True. 2021-03-09 13:30:51 +01:00
Chris Jerdonek 465fdffda0 Refs -- Simplified filter_tests_by_tags(). 2021-03-08 09:54:01 +01:00
Chris Jerdonek 8ff75a3d9e Refs -- Simplified partition_suite_by_case(). 2021-03-08 09:53:31 +01:00
Chris Jerdonek cc12894017 Refs -- Removed unneeded partition_suite_by_type(). 2021-03-08 09:53:31 +01:00
Diego Lima 2e5aa444d1 Fixed -- Made OrderedSet reversible.
Refs .
2021-03-08 08:22:07 +01:00
Johan Schiff d01709aae2 Fixed -- Added QuerySet.contains(). 2021-03-06 20:40:29 +01:00
Chris Jerdonek 22c9af0eae Fixed -- Added iter_test_cases() to iterate over a TestSuite.
This also makes partition_suite_by_type(), partition_suite_by_case(),
filter_tests_by_tags(), and DiscoverRunner._get_databases() to use
iter_test_cases().
2021-03-05 13:04:07 +01:00