summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2019-06-21Fixed typo in BasicExpressionsTests.test_object_update_fk() test.Mariusz Felisiak
2019-06-20Refs #30451 -- Added more tests for ASGIRequest and ASGIHandler.Mariusz Felisiak
2019-06-20Fixed #30451 -- Added ASGI handler and coroutine-safety.Andrew Godwin
This adds an ASGI handler, asgi.py file for the default project layout, a few async utilities and adds async-safety to many parts of Django.
2019-06-20Fixed #30565 -- Closed HttpResponse when wsgi.file_wrapper closes file-like ↵Chris Jerdonek
object.
2019-06-19Refs #30485 -- Removed non-representative test that emitted a warning.Jon Dufresne
Previously, when running the Django test suite with warnings enabled, the following was emitted: /usr/lib64/python3.7/urllib/parse.py:915: BytesWarning: str() on a bytearray instance v = quote_via(str(v), safe, encoding, errors) This occurred due to the bytearray() being passed to urllib.parse.urlencode() which eventually calls str() on it. The test does not represent desired real world behavior. Rather than test for and assert strange unspecified behavior that emits a warning, remove it. This was also discussed in PR #11374.
2019-06-19Fixed #29834 -- Fixed column mismatch crash with ↵can
QuerySet.values()/values_list() and order_by() on combined querysets.
2019-06-19Fixed #30572 -- Prevented values()/values_list() on combined queryset from ↵Mariusz Felisiak
mutating the list of columns in querysets.
2019-06-18Fixed LiveWidgetTests.test_textarea_trailing_newlines() crash on Chrome 75+.Mariusz Felisiak
2019-06-17Fixed typos in FakePayload docstring and SimplifiedURLTests test name.Min ho Kim
2019-06-14Fixed #12952 -- Adjusted admin log change messages to use form labels ↵Sanyam Khurana
instead of field names.
2019-06-13Refs #30512, #15042 -- Added local-only address to sanitize_email() tests cases.Carlton Gibson
email.headerregistry.parser.get_mailbox() returns a token with a `token_type` attribute. If `token_type` is `’invalid-mailbox’` then RFC violations have been detected. Emails with only the local part, and no domain, are correctly parsed but are marked as `’invalid-mailbox’`. As per #15042, local-only are supported, to enable sending to addresses on localhost. sanitize_email() does not currently check `token_type`. This test is added to avoid a regression in case this is revisited in the future.
2019-06-13Fixed #30512 -- Used email.headerregistry.parser for parsing emails in ↵Joachim Jablon
sanitize_address().
2019-06-13Fixed #30128 -- Fixed handling timedelta timezone in database functions.can
2019-06-12Simplified GISFunctionsTests.test_point_on_surface().Mariusz Felisiak
2019-06-12Added missing support for PointOnSurface function on MariaDB.Mariusz Felisiak
2019-06-12Removed obsolete comment from GISFunctionsTests.test_asgeojson().Mariusz Felisiak
2019-06-12Fixed GISFunctionsTests.test_asgeojson() crash on MariaDB 10.2+.Mariusz Felisiak
2019-06-11Fixed #27486 -- Fixed Python 3.7 DeprecationWarning in intword and ↵Jon Dufresne
filesizeformat filters. intword and filesizeformat passed floats to ngettext() which is deprecated in Python 3.7. The rationale for this warning is documented in BPO-28692: https://bugs.python.org/issue28692. For filesizeformat, the filesize value is expected to be an int -- it fills %d string formatting placeholders. It was likely coerced to a float to ensure floating point division on Python 2. Python 3 always does floating point division, so coerce to an int instead of a float to fix the warning. For intword, the number may contain a decimal component. In English, a decimal component makes the noun plural. A helper function, round_away_from_one(), was added to convert the float to an integer that is appropriate for ngettext().
2019-06-11Refs #27486 -- Added tests for filesizeformat filter.Jon Dufresne
2019-06-10Fixed #30548 -- Improved exception when expression contains mixed types.CruxBox
2019-06-10Fixed #30556 -- Avoided useless query and hasher call in ↵Aymeric Augustin
ModelBackend.authenticate() when credentials aren't provided. There's no need to fetch a user instance from the database unless a username and a password are provided as credentials.
2019-06-10Refs #27804 -- Used subTest() in filesizeformat tests and HumanizeTests.Jon Dufresne
2019-06-07Fixed #29379 -- Added autocomplete attribute to contrib.auth.forms fields.Hasan Ramezani
Thank you to Nick Pope for review. Co-authored-by: CHI Cheng <cloudream@gmail.com>
2019-06-07Fixed #30521 -- Fixed invalid HTML in default error pages.Alexandre Varas
2019-06-07Refs #30521 -- Added tests for content of default error pages.Mariusz Felisiak
2019-06-07Fixed #30550 -- Fixed decoding of non-UTF-8 bytes objects in response.json().Jon Dufresne
2019-06-07Refs #27804 -- Used subTest() in BinaryFieldTests.test_set_and_retrieve.Jon Dufresne
2019-06-06Refs #30512 -- Added tests for sanitizing email addresses with display name ↵Joachim Jablon
and two @ signs.
2019-06-06Refs #30512 -- Used subTest() in MailTests.test_sanitize_address.Joachim Jablon
2019-06-06Fixed #29706 -- Made RenameContentType._rename() save to the correct database.Hasan Ramezani
2019-06-05Refs #30226 -- Added User.get_user_permissions() method.Tobias Bengfort
Added to mirror the existing User.get_group_permissions().
2019-06-05Fixed #30226 -- Added BaseBackend for authentication.Tobias Bengfort
2019-06-05Fixed #30542 -- Fixed crash of numerical aggregations with filter.Étienne Beaulé
Filters in annotations crashed when used with numerical-type aggregations (i.e. Avg, StdDev, and Variance). This was caused as the source expressions no not necessarily have an output_field (such as the filter field), which lead to an AttributeError: 'WhereNode' object has no attribute output_field. Thanks to Chuan-Zheng Lee for the report. Regression in c690afb873cac8035a3cb3be7c597a5ff0e4b261 and two following commits.
2019-06-04Fixed typo in tests/generic_views/test_base.py.Tim Graham
2019-06-04Fixed #30520 -- Fixed crash of admin model inlines on custom fields without ↵Jones Ambrosi
labels.
2019-06-04Fixed #30534 -- Fixed overriding a field's default in ModelForm.cleaned_data().RobertAKARobin
2019-06-03Fixed #28604 -- Prevented ManifestStaticFilesStorage from leaving ↵Nathan Gaberel
intermediate files.
2019-06-03Fixed CVE-2019-12308 -- Made AdminURLFieldWidget validate URL before ↵Carlton Gibson
rendering clickable link.
2019-05-31Fixed #30493 -- Fixed prefetch_related() for GenericRelation with different ↵can
content types. Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com> Thanks Simon Charette for the review.
2019-05-31Simplified m2m_recursive.tests.Mariusz Felisiak
2019-05-31Fixed #26192 -- Fixed crash of ordering by constants on PostgreSQL.Mariusz Felisiak
Thanks Simon Charette for the review.
2019-05-31Refs #26192 -- Added tests for ordering by constant value.Mariusz Felisiak
2019-05-31Fixed #28520 -- Added --start-at/--start-after options to runtests.py.Hasan Ramezani
2019-05-30Refs #28520 -- Added _module_match_label() hook to runtests.py.Hasan Ramezani
2019-05-29Fixed #30523 -- Fixed updating file modification times on seen files in ↵Tom Forbes
auto-reloader when using StatReloader. Previously we updated the file mtimes if the file has not been seen before - i.e on the first iteration of the loop. If the mtime has been changed we triggered the notify_file_changed() method which in all cases except the translations will result in the process being terminated. To be strictly correct we need to update the mtime for either branch of the conditional. Regression in 6754bffa2b2df15a741008aa611c1bb0e8dff22b.
2019-05-29Fixed #30516 -- Fixed crash of autoreloader when re-raising exceptions with ↵Tom Forbes
custom signature. Regression in c8720e7696ca41f3262d5369365cc1bd72a216ca.
2019-05-28Fixed #30315 -- Fixed crash of ArrayAgg and StringAgg with ordering when ↵Caio Ariede
used in Subquery.
2019-05-28Fixed #30479 -- Fixed detecting changes in manage.py by autoreloader when ↵Tom Forbes
using StatReloader. Regression in c8720e7696ca41f3262d5369365cc1bd72a216ca.
2019-05-27Fixed typo in RasterField test name.Ivor Bosloper
2019-05-27Refs #24944 -- Added test for overriding domain in email context in ↵Mattia Procopio
PasswordResetView.