Aymeric Augustin
92837ae569
Avoided firing the request_finished signal in tests.
...
* Avoided calling BaseHttpResponse.close(). The test client take care of
that since acc5396e
.
* Disconnected the request_finished signal when this method must be
called. The test client has a similar implementation since bacb097a
.
2013-02-18 14:32:45 +01:00
Hiroki Kiyohara
e94f405d94
Fixed #18558 -- Added url property to HttpResponseRedirect*
...
Thanks coolRR for the report.
2013-02-13 10:29:32 +01:00
Aymeric Augustin
89cb771be7
Fixed #19692 -- Completed deprecation of mimetype in favor of content_type.
...
Thanks Tim for the report and initial patch.
2013-01-31 13:54:40 +01:00
Julien Phalip
9180146d21
Fixed #19453 -- Ensured that the decorated function's arguments are obfuscated in the @sensitive_variables decorator's frame, in case the variables associated with those arguments were meant to be obfuscated from the decorated function's frame.
...
Thanks to vzima for the report.
2012-12-31 09:34:08 -08:00
Florian Apolloner
a2f2a39956
Fixed #18856 -- Ensured that redirects can't be poisoned by malicious users.
2012-12-10 22:11:39 +01:00
Claude Paroz
c91667338a
Fixed #19357 -- Allow non-ASCII chars in filesystem paths
...
Thanks kujiu for the report and Aymeric Augustin for the review.
2012-12-08 11:13:52 +01:00
Jannis Leidel
f79013843d
Fixed typo introduced in 4a5e8087ac
.
2012-11-17 16:00:19 +01:00
Jannis Leidel
4a5e8087ac
Fixed #19136 -- Properly escape gettext context prefixes in the i18n JavaScript view template.
2012-11-17 15:37:30 +01:00
Aymeric Augustin
d7c6a57d60
Used @override_settings in several tests.
2012-10-20 23:22:46 +02:00
Aymeric Augustin
4b27813198
Fixed #7581 -- Added streaming responses.
...
Thanks mrmachine and everyone else involved on this long-standing ticket.
2012-10-20 20:05:11 +02:00
Claude Paroz
4797ad80da
[py3] Decoded the parsed source file encoding in debug view
2012-10-08 10:06:56 +02:00
Claude Paroz
8bd7b598b6
Fixed #18807 -- Made 404.html and 500.html optional
...
Thanks Aymeric Augustin for the report and Jannis Leidel for the
review.
2012-09-30 23:16:19 +02:00
Claude Paroz
3cbe686af6
Fixed #18675 -- Fixed was_modified_since with floating-point mtime
...
Thanks Simon Charette for the patch.
2012-09-26 21:12:56 +02:00
Claude Paroz
b1fb6f4820
Modernized views.DebugViewTests
2012-09-15 21:07:42 +02:00
Claude Paroz
a9facb455f
[py3] Fix some more encoding issues in tests
2012-08-15 17:41:38 +02:00
Aymeric Augustin
e0ec7507ac
[py3] Fixed jsi18n test.
...
Also refactored said test to avoid leaking state (ie. active
translation) when an error occurs.
2012-08-15 09:45:28 +02:00
Aymeric Augustin
d4a0b27838
[py3] Refactored __unicode__ to __str__.
...
* Renamed the __unicode__ methods
* Applied the python_2_unicode_compatible decorator
* Removed the StrAndUnicode mix-in that is superseded by
python_2_unicode_compatible
* Kept the __unicode__ methods in classes that specifically
test it under Python 2
2012-08-12 14:44:40 +02:00
Claude Paroz
6602103338
[py3] Various minor syntax fixes in the test suite
2012-08-11 23:23:31 +02:00
Simon Meers
10f979fd92
Fixed #18700 -- Added URL reversal for i18n set_language view.
2012-08-04 20:57:12 +10:00
Claude Paroz
4a103086d5
Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
...
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Julien Phalip
f699641161
Fixed #17138 -- Made the sensitive_variables decorator work with object methods.
2012-06-03 23:44:13 -07:00
Claude Paroz
edfa95c22f
Specified when open should use binary mode.
...
Thanks Vinaj Sajip for the help of his django3 branch.
2012-05-25 20:43:43 +02:00
Claude Paroz
38408f8007
Marked bytestrings with b prefix. Refs #18269
...
This is a preparation for unicode literals general usage in
Django (Python 3 compatibility).
2012-05-19 17:43:34 +02:00
Claude Paroz
865cd35c9b
Made more extensive usage of context managers with open.
2012-05-05 14:06:36 +02:00
Claude Paroz
1858e47672
Fixed #18033 -- Removed function-based generic views, as per official deprecation timeline. Rest in peace! Thanks Anssi Kääriäinen for the review.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17937 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-25 19:17:47 +00:00
Claude Paroz
0e01023897
Converted more test assertions to assert[Not]Contains.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17910 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-14 13:35:25 +00:00
Claude Paroz
883c38c499
Fixed #17848 -- Added setting_changed signal for cases when TEMPLATE_CONTEXT_PROCESSORS is overriden in tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-09 13:24:57 +00:00
Claude Paroz
9383a2761c
Removed with_statement imports, useless in Python >= 2.6. Refs #17965 . Thanks jonash for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 08:02:08 +00:00
Jannis Leidel
f0a1633425
Fixed #17358 -- Updated logging calls to use official syntax for arguments instead of string interpolation. Thanks, spulec.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17480 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-09 18:58:36 +00:00
Carl Meyer
844a24bbb9
Fixed #16921 -- Added assertHTMLEqual and assertHTMLNotEqual assertions, and converted Django tests to use them where appropriate. Thanks Greg Müllegger.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-31 20:36:11 +00:00
Julien Phalip
9d410ee64b
Fixed #17197 -- Prevented a locale leakage from an i18n test causing collateral failures in the rest of the test suite. Thanks to Florian Apolloner for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17080 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-11 12:25:53 +00:00
Julien Phalip
4d79083453
Fixed #17111 -- Made the `redirect_to` generic view properly handle query strings with percent symbols. Thanks, Chris Adams.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17034 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 06:33:13 +00:00
Alex Gaynor
8c0eefd066
Convert the remainder of the relative imports in the tests to be absolute imports.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 21:34:56 +00:00
Aymeric Augustin
e2f9c11736
Fixed #16705 - Made the test client adhere to the WSGI spec -- in particular, removed the assumption that environ['QUERY_STRING'] exists.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-06 20:39:15 +00:00
Ramiro Morales
0d9b6a5bc4
Fixed #10841 -- Switched response served when DEBUG=True and request.is_ajax() returns True (indicating request has been generated by a JS library) to a plain text version for easier debugging.
...
Contents of this response are similar to its HTML counterpart modulo frame variables values in the Python traceback section.
Thanks to Riz for the report, to SmileyChris for the patch and to Julien for reviewing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16921 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-02 02:53:58 +00:00
Carl Meyer
4397c587a4
Fixed #16770 -- Eliminated TemplateSyntaxError wrapping of exceptions. Thanks to Justin Myles-Holmes for report and draft patch.
...
Exceptions raised in templates were previously wrapped in TemplateSyntaxError
(in TEMPLATE_DEBUG mode only) in order to provide template source details on
the debug 500 page. The same debug information is now provided by annotating
exceptions rather than wrapping them. This makes catching exceptions raised
from templates more sane, as it's consistent in or out of DEBUG, and you can
catch the specific exception(s) you care about rather than having to also catch
TemplateSyntaxError and unwrap it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16833 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-16 01:16:25 +00:00
Ramiro Morales
26b8122087
Fixed #14675 -- Completed removal of `from django.conf.urls.default import *` usage.
...
This applies to both our own [test] code and documentation examples. Also:
* Moved the functions and handlers from `django.conf.urls.defaults` up to
`django.conf.urls` deprecating the former module.
* Added documentation for `handler403`.
* Tweaked the URLs topic document a bit.
Thanks to pupeno and cdestigter for their great work contributing patches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 22:36:16 +00:00
Jannis Leidel
1ca6e9b9e2
Fixed #9847 -- Added 403 response handler. Many thanks to kgrandis, adamnelson, vkryachko, fvox13 and Chris Beaven.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16606 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:15:31 +00:00
Jannis Leidel
24f4764a48
Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for the work on the patch and Alex for reviewing.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13 09:35:51 +00:00
Carl Meyer
43503b093a
Fixed #16288 -- Enabled django.request exception logger regardless of DEBUG setting.
...
Thanks Matt Bennett for report and draft patch; Vinay Sajip and Russell Keith-Magee for review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16444 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-22 06:01:44 +00:00
Jannis Leidel
3d970762af
Fixed naming of test methods for the sake of consistency.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-14 10:35:13 +00:00
Luke Plant
45e55b9143
Fixed #14614 - filtering of sensitive information in 500 error reports.
...
This adds a flexible mechanism for filtering what request/traceback
information is shown in 500 error emails and logs. It also applies
screening to some views known to be sensitive e.g. views that handle
passwords.
Thanks to oaylanc for the report and many thanks to Julien Phalip for the
patch and the rest of the work on this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16339 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-08 22:18:46 +00:00
Ramiro Morales
0065d8a120
Made expected output platform-independent in a test for the template postmortem debug 500 view so it doesn't fail under Windows.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-24 21:33:32 +00:00
Luke Plant
4d039d8d05
Fixed #15980 - Unknown encoding "utf8" in tests/regressiontests/views/__init__.py
...
Thanks to davidbarnett2 for the report
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16170 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-07 10:47:11 +00:00
Jannis Leidel
b0d274dbd5
Added missing future imports missed in r16167.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16169 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-06 19:49:06 +00:00
Jannis Leidel
7dd72360a2
Make use of new translation and settings context manager in the tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16167 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-06 13:29:44 +00:00
Carl Meyer
04654e554f
Refs #15903 -- Added a per-TestCase urlconf to reduce coupling between test apps.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16107 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-27 15:47:16 +00:00
Russell Keith-Magee
29642fa76f
Refactored views regression tests to isolate generic views from the root URL space.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16000 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 13:27:40 +00:00
Russell Keith-Magee
4c468800ee
Updates to the test suite to allow for newly deprecated and removed features
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15990 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 08:44:47 +00:00
Russell Keith-Magee
afd040d4d3
Updated test assertions that have been deprecated by the move to unittest2. In summary, this means:
...
assert_ -> assertTrue
assertEquals -> assertEqual
failUnless -> assertTrue
For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 15:04:39 +00:00