Commit Graph

98 Commits

Author SHA1 Message Date
Claude Paroz aa5ab114e3 Fixed #24122 -- Redirected to translated url after setting language
Thanks gbdlin for the initial patch and Tim Graham for the review.
2015-03-13 16:46:40 +01:00
Bas Peschier 756cee46d2 Fixed #24455 -- Fixed crash in debug view with lazy objects 2015-03-09 20:30:01 -04:00
Josh Smeaton 39a7eed1bb Converted test fixtures to setUpTestData methods 2015-03-05 10:10:32 +11:00
Preston Timmons 70123cf084 Fixed #24399 -- Made filesystem loaders use more specific exceptions. 2015-03-03 21:20:46 +01:00
Aymeric Augustin a8fe12417f Normalized usage of the tempfile module.
Specifically stopped using the dir argument.
2015-02-23 16:55:27 +01:00
Aymeric Augustin 88a5f17d25 Fixed #24389 -- Isolated the CSRF view from the TEMPLATES setting.
Thanks uranusjr for the report and analysis.
2015-02-22 15:46:35 +01:00
Aymeric Augustin 15b711b5ee Deprecated TEMPLATE_DEBUG setting. 2015-02-15 20:47:04 +01:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
darkryder 9ec8aa5e5d Fixed #24149 -- Normalized tuple settings to lists. 2015-02-03 14:59:45 -05:00
Claude Paroz f8e4e4a935 Fixed warning leak in static.serve() test
Partial forward port of b1bf8d64fb from 1.7.x. Refs #24193.
2015-01-23 09:09:48 +01:00
Tim Graham a6f144fd4f Fixed a static view test on Windows. 2015-01-14 13:56:49 -05:00
Tim Graham a3bebfdc34 Ensured views.static.serve() doesn't use large memory on large files.
This issue was fixed in master by refs #24072.
2015-01-13 13:03:06 -05:00
Aymeric Augustin 6b5113ec94 Made debug views not crash when there isn't a default template engine. 2015-01-12 21:01:34 +01:00
Aymeric Augustin a3e783fe11 Deprecated passing a Context to a generic Template.render.
A deprecation path is required because the return type of
django.template.loader.get_template changed during the
multiple template engines refactor.

test_csrf_token_in_404 was incorrect: it tested the case when the
hardcoded template was rendered, and that template doesn't depend on the
CSRF token. This commit makes it test the case when a custom template is
rendered.
2015-01-12 21:01:34 +01:00
Aymeric Augustin d3205e3e2e Deprecated TEMPLATE_DIRS. 2014-12-28 17:02:30 +01:00
Aymeric Augustin cf0fd65ed4 Deprecated TEMPLATE_LOADERS. 2014-12-28 17:02:30 +01:00
Tim Graham b8cc5f3cd4 Fixed selenium test failure of JavascriptI18nTests.
The failure was introduced in dd1ea70779.
The tests wouldn't start due to a "Dependency on unknown app" error.
2014-12-01 16:42:48 -05:00
Aymeric Augustin bf1bd0fbc9 Moved tests for render shortcuts to their own app. 2014-11-22 17:52:43 +01:00
Aymeric Augustin b503fee7ec Removed override_template_loaders and override_with_test_loader.
They can be replaced with override_settings and that makes the
corresponding tests much more obvious.
2014-11-16 21:40:50 +01:00
Berker Peksag f7969b0920 Fixed #23620 -- Used more specific assertions in the Django test suite. 2014-11-03 11:56:37 -05:00
Claude Paroz 00f8b4dfae Lowered memory consumption in debug ouput test 2014-08-26 22:42:41 +02:00
Walter Doekes e0e28bfe71 Fixed #20368 -- Made TECHNICAL_500 more robust against bad input.
This limits large variables and avoids non-utf-8 in the TECHNICAL_500 output.
2014-08-13 12:56:26 -04:00
Tim Graham a9fd740d22 Fixed #23276 -- Deprecated passing views as strings to url(). 2014-08-12 13:15:40 -04:00
Hiroki KIYOHARA d0889863de Fixed code to solve #23070 problem
Added a class to wrap callable in settings:
* Not to call in the debug page (#21345).
* Not to break the debug page if the callable forbidding to set attributes (#23070).

Thanks @bmispelon for giving me some advice.
2014-07-26 12:35:51 +02:00
Hiroki KIYOHARA e569144910 Added test for the #23070 problem 2014-07-26 12:01:44 +02:00
Tim Graham 5954aa6db0 Added Chrome/IE support for a selenium test. 2014-07-16 10:52:49 -04:00
Tim Graham 89b9e6e5d6 Fixed #22909 -- Removed camelCasing in some tests.
Thanks brylie.
2014-07-07 19:08:42 -04:00
Julia Matsieva 29c1151a55 Fixed #22756 -- Added view name to technical 404 template if Http404 is raised.
Thanks Keryn Knight for the suggestion.
2014-06-30 15:34:35 -04:00
Anubhav Joshi dbbcfca476 Fixed #21668 -- Return detailed error page when SuspiciousOperation is raised and DEBUG=True
Thanks GDorn and gox21 for report.

Thanks Tim Graham for idea and review.
2014-06-24 08:55:36 -04:00
Florian Apolloner 536ebaa048 Fixed a few warnings in the testsuite. 2014-05-25 23:14:50 +02:00
Unai Zalakain 4dc4d12e27 Fixed #21598 -- cleaned up template loader overrides in tests
- Template loader overriding is managed with contexts.
- The test loader is a class (function based loaders entered deprecation timeline
  in 1.4).
- Template loader overrider that overrides with test loader added.
2014-05-22 18:35:16 -04:00
Claude Paroz e520a73eee Harmonized some PEP 0263 coding preambles 2014-05-15 19:58:41 +02:00
chriscauley 66ec9ee441 Fixed #22378 -- Updated \d to [0-9]+ in urlpatterns of docs and tests.
Thanks tomwys for the suggestion.
2014-04-16 20:36:29 -04:00
Anubhav Joshi cd914e31c9 Fixed #21977 -- Deprecated SimpleTestCase.urls 2014-04-06 17:33:43 -04:00
Tim Graham d73d0e071c Fixed #22218 -- Deprecated django.conf.urls.patterns.
Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
2014-04-03 07:28:10 -04:00
Tim Graham e2ac0203d9 Skipped JavascriptI18nTests if Firefox isn't properly configured.
Code borrowed from django.contrib.admin.tests. Without this, the class can
throw an exception with something like "The browser appears to have exited
before we could connect. The output was: Error: no display specified"
2014-03-27 14:19:31 -04:00
Rodolfo Carvalho 0d91225892 Fixed many typos in comments and docstrings.
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Sergey Kolosov 8c98f39624 Fixed #15318 -- Added settings for language cookie max-age, path, domain
Introduced a number of settings to configure max-age, path, and domain
for the language cookie: LANGUAGE_COOKIE_AGE, LANGUAGE_COOKIE_PATH and
LANGUAGE_COOKIE_DOMAIN.

Thanks sahid for the suggestion.
2014-03-01 07:52:45 -05:00
Erik Romijn 8cd32f0965 Fixed #22120 -- Documented persistent activation of languages and cleaned up language session key use 2014-02-22 18:29:06 +01:00
Baptiste Mispelon 926e18d7d1 Deprecated django.utils.text.javascript_quote.
Refs #21725.
2014-02-22 13:50:12 +01:00
Baptiste Mispelon cd027aaadf Added some tests for #21725. 2014-02-22 13:50:12 +01:00
Grzegorz Nosek 79558c787e Fixed #18373 - improved handling of Resolver404s from views
When django.core.urlresolvers.resolve was called from a view, failed
and the exception was propagated and rendered by technical_404_response,
the URL mentioned on the page was the current URL instead of the URL
passed to resolve().

Fixed by using the path attribute from the Resolver404 exception instead
of request.path_info. Also cleaned up the exceptions to use standard
named parameters instead of stuffing a dict in args[0]
2014-02-15 15:56:04 +01:00
Lukasz Balcerzak 0242134d32 Fixed #17942 -- Added a JsonResponse class to more easily create JSON encoded responses.
Thanks leahculver for the suggestion and Erik Romijn,
Simon Charette, and Marc Tamlyn for the reviews.
2014-02-14 18:25:19 -05:00
Marc Tamlyn 2607fa9016 Fixed #21774 -- Isolate all test urls from eachother.
This (nearly) completes the work to isolate all the test modules from
each other. This is now more important as importing models from another
module will case PendingDeprecationWarnings if those modules are not in
INSTALLED_APPS. The only remaining obvious dependencies are:

- d.c.auth depends on d.c.admin (because of the is_admin flag to some
  views), but this is not so important and d.c.admin is in
  always_installed_apps
- test_client_regress depends on test_client. Eventually these should
  become a single module, as the split serves no useful purpose.
2014-01-14 15:43:27 +00:00
Florian Apolloner 7d0a519032 Revert "Fixed #21227 -- Added workaround for selenium test failures"
This reverts commit 08c9ab5a0f.
2014-01-03 00:44:49 +01:00
Aymeric Augustin e32095616c Imported override_settings from its new location. 2013-12-23 21:37:56 +01:00
Aymeric Augustin da16bb30ff Dropped AppCache._empty, _with_app and _without_app.
It's now easier to achieve the same effect with modify_settings or
override_settings.
2013-12-23 21:37:56 +01:00
Aymeric Augustin 5241763c81 Added modify_settings to alter settings containing lists of values. 2013-12-23 21:37:43 +01:00
Aymeric Augustin 046a8eb9c4 Made apps available for loading traslations in a test. 2013-12-22 19:04:08 +01:00
Aymeric Augustin 865603780b Moved a test that didn't require Selenium. 2013-12-22 18:50:49 +01:00