summaryrefslogtreecommitdiff
path: root/tests/generic_views/test_base.py
AgeCommit message (Collapse)Author
2025-09-22Fixed #36488 -- Fixed merging of query strings in RedirectView.Samriddha9619
Co-authored-by: Ethan Jucovy <ethan.jucovy@gmail.com> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-06-06Refs CVE-2025-48432 -- Prevented log injection in remaining response logging.Jake Howard
Migrated remaining response-related logging to use the `log_response()` helper to avoid potential log injection, to ensure untrusted values like request paths are safely escaped. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-12-18Refs #26007 -- Improved the ImproperlyConfigured error message for ↵Andrew Miller
SingleObjectTemplateResponseMixin.get_template_names().
2023-02-01Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-10-20Refs #32956 -- Capitalized HTTP/HTTPS in comments, docs, and docstrings.David Smith
2021-10-18Refs #32956 -- Changed docs to treat the acronym HTTP phonetically.David Smith
2021-03-30Fixed #32260 -- Made View.as_view() do not use update_wrapper().Daniyal
View.as_view() should not use update_wrapper() for copying attributes it's unintended and have side-effects such as adding `self` to the signature. This also fixes system check for arguments of custom error handler views with class-based views. Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
2020-09-14Fixed #31789 -- Added a new headers interface to HttpResponse.Tom Carrick
2020-08-24Fixed #31877 -- Reverted "Fixed #19878 -- Deprecated TemplateView passing ↵Mariusz Felisiak
URL kwargs into context." This reverts commit 4ed534758cb6a11df9f49baddecca5a6cdda9311.
2020-08-24Refs #31877 -- Reverted "Fixes #31877 -- Used lazy() for TemplateView kwarg ↵Mariusz Felisiak
deprecation warning." This reverts commit 20799cc0a6d98816b9ef0577e24691bd26b80d7d.
2020-08-13Fixes #31877 -- Used lazy() for TemplateView kwarg deprecation warning.Adam Johnson
SimpleLazyObjects cause a crash when filtering. Thanks Tim L. White for the report. Regression in 4ed534758cb6a11df9f49baddecca5a6cdda9311.
2020-03-23Fixed #19878 -- Deprecated TemplateView passing URL kwargs into context.Adam Johnson
2020-01-06Removed "Don't do that" from docs and error messages.Adam Johnson
It's slightly aggressive and doesn't explain itself.
2019-10-30Refs #20456 -- Moved initialization of HEAD method based on GET to the ↵Felipe Lee
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-30Refs #20456 -- Added test for initialization of request/args/kwargs ↵Felipe Lee
attributes in View.Setup().
2019-06-04Fixed typo in tests/generic_views/test_base.py.Tim Graham
2018-12-21Fixed #29750 -- Added View.setup() hook for class-based views.François Freitag
2018-12-04Tested exception messages in generic_views tests.François Freitag
2017-07-29Used assertRaisesMessage() to test Django's error messages.Mads Jensen
2017-07-06Fixed #28331 -- Added ContextMixin.extra_context to allowing passing context ↵Bruno Alla
in as_view().
2017-06-01Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne
2017-03-01Fixed #26911 -- Removed NoReverseMatch silencing in RedirectView.Grzegorz Tężycki
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-06-28Replaced use of TestCase.fail() with assertRaises().Tim Graham
Also removed try/except/fail antipattern that hides exceptions.
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan
2015-12-31Fixed #26013 -- Moved django.core.urlresolvers to django.urls.Marten Kenbeek
Thanks to Tim Graham for the review.
2015-11-21Fixed #25780 -- Removed redundant status code assertions from testsAlex Morozov
2015-05-20Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-03Fixed #24168 -- Allowed selecting a template engine in a few APIs.Aymeric Augustin
Specifically in rendering shortcuts, template responses, and class-based views that return template responses. Also added a test for render_to_response(status=...) which was missing from fdbfc980. Thanks Tim and Carl for the review.
2015-01-18Changed RedirectView.permanent to False per deprecation timeline; refs #21587.Tim Graham
2015-01-17Fixed #24055 -- Keep reference to view class for resolve()Collin Anderson
2014-12-30Applied ignore_warnings to Django testsClaude Paroz
2014-11-25Fixed #21587 -- Added a warning for changing default of RedirectView.permanent.Berker Peksag
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-04-06Fixed #21977 -- Deprecated SimpleTestCase.urlsAnubhav Joshi
2013-12-16Fixed #21564 -- Use local request object when possible in generic views.Baptiste Mispelon
Thanks to trac user adepue for the report and original patch.
2013-11-02PEP8 cleanupJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-10-19Removed unused local variables in tests.Tim Graham
2013-09-06fixed test name from an old, overly specific iteration of the testIan Wilson
2013-09-06adds fix for SingleObjectTemplateResponseMixin raising a ↵Ian Wilson
TemplateDoesNotExist when it should have raised an ImproperlyConfigured. fixes 16502. by @ianawilson, @jambonrose
2013-07-29Removed most of absolute_import importsClaude Paroz
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
2013-07-01Stopped using django.utils.unittest in the test suite.Aymeric Augustin
Refs #20680.
2013-06-14Fixed #15273 -- Extend RedirectView to allow reversal by name.Marc Tamlyn
Thanks to @DrMeers for the report and @ludwigkraatz for the initial patch.
2013-05-22Fixed #20478 – Added support for HTTP PATCH method in generic views.Krzysztof Jurewicz
2013-05-21Use assertIsInstance in tests.Marc Tamlyn
Gives much nicer errors when it fails.