Jon Dufresne
2c69824e5a
Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.
2017-06-01 19:08:59 -04:00
Grzegorz Tężycki
fede65260a
Fixed #26911 -- Removed NoReverseMatch silencing in RedirectView.
2017-03-01 15:56:39 -05:00
chillaranand
d6eaf7c018
Refs #23919 -- Replaced super(ClassName, self) with super().
2017-01-25 12:23:46 -05:00
Claude Paroz
d7b9aaa366
Refs #23919 -- Removed encoding preambles and future imports
2017-01-18 09:55:19 +01:00
za
321e94fa41
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
2016-11-10 21:30:21 -05:00
Tim Graham
c9ae09addf
Replaced use of TestCase.fail() with assertRaises().
...
Also removed try/except/fail antipattern that hides exceptions.
2016-06-28 11:21:26 -04:00
Hasan
3d0dcd7f5a
Refs #26022 -- Used context manager version of assertRaises in tests.
2016-01-29 12:32:18 -05:00
Marten Kenbeek
16411b8400
Fixed #26013 -- Moved django.core.urlresolvers to django.urls.
...
Thanks to Tim Graham for the review.
2015-12-31 14:21:29 -05:00
Alex Morozov
13dba4dba3
Fixed #25780 -- Removed redundant status code assertions from tests
2015-11-21 18:12:33 +01:00
Simon Charette
be67400b47
Refs #24652 -- Used SimpleTestCase where appropriate.
2015-05-20 13:46:13 -04:00
Tim Graham
0ed7d15563
Sorted imports with isort; refs #23860 .
2015-02-06 08:16:28 -05:00
Aymeric Augustin
2133f3157e
Fixed #24168 -- Allowed selecting a template engine in a few APIs.
...
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-02-03 08:29:45 +01:00
Tim Graham
6e13c0490d
Changed RedirectView.permanent to False per deprecation timeline; refs #21587 .
2015-01-18 17:43:06 -05:00
Collin Anderson
a420f83e7d
Fixed #24055 -- Keep reference to view class for resolve()
2015-01-17 22:09:10 +07:00
Claude Paroz
51890ce889
Applied ignore_warnings to Django tests
2014-12-30 18:16:25 +01:00
Berker Peksag
9a30acad8a
Fixed #21587 -- Added a warning for changing default of RedirectView.permanent.
2014-11-25 09:22:18 -05:00
Berker Peksag
f7969b0920
Fixed #23620 -- Used more specific assertions in the Django test suite.
2014-11-03 11:56:37 -05:00
Anubhav Joshi
cd914e31c9
Fixed #21977 -- Deprecated SimpleTestCase.urls
2014-04-06 17:33:43 -04:00
Baptiste Mispelon
e2f142030b
Fixed #21564 -- Use local request object when possible in generic views.
...
Thanks to trac user adepue for the report and original patch.
2013-12-16 16:58:08 +01:00
Jason Myers
7a61c68c50
PEP8 cleanup
...
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02 23:50:49 -05:00
Tim Graham
96d1d4e292
Removed unused local variables in tests.
2013-10-19 08:31:38 -04:00
Ian Wilson
d005130845
fixed test name from an old, overly specific iteration of the test
2013-09-06 17:20:43 -05:00
Ian Wilson
b79df0b358
adds fix for SingleObjectTemplateResponseMixin raising a TemplateDoesNotExist when it should have raised an ImproperlyConfigured. fixes 16502. by @ianawilson, @jambonrose
2013-09-06 16:27:34 -05:00
Claude Paroz
5c1143910e
Removed most of absolute_import imports
...
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
2013-07-29 20:28:13 +02:00
Aymeric Augustin
cfcf4b3605
Stopped using django.utils.unittest in the test suite.
...
Refs #20680 .
2013-07-01 14:29:33 +02:00
Marc Tamlyn
b7bd7087e6
Fixed #15273 -- Extend RedirectView to allow reversal by name.
...
Thanks to @DrMeers for the report and @ludwigkraatz for the initial patch.
2013-06-14 11:59:26 +01:00
Krzysztof Jurewicz
ee8b810b97
Fixed #20478 – Added support for HTTP PATCH method in generic views.
2013-05-22 14:48:11 +02:00
Marc Tamlyn
09f8652765
Use assertIsInstance in tests.
...
Gives much nicer errors when it fails.
2013-05-21 10:42:15 +01:00
Karol Sikora
3eba8c7f7f
Fixed #20234 and #20236 -- SingleObjectMixin fixes
...
Added object on SingleObjectMixin returned context,
some code clanup.
2013-05-18 21:13:27 +02:00
Matthew Somerville
1c921cfac3
Fixed #20235 -- Use self.object_list if object_list not present in get_context_data kwargs.
...
This is so MultipleObjectMixin can be used in the same way as
SingleObjectMixin.
2013-05-18 14:10:40 +02:00
Preston Timmons
3ca3d2206c
Modified generic_views for unittest2 discovery.
2013-04-12 15:10:04 -06:00