summaryrefslogtreecommitdiff
path: root/tests/view_tests
AgeCommit message (Collapse)Author
2014-02-22Added some tests for #21725.Baptiste Mispelon
2014-02-15Fixed #18373 - improved handling of Resolver404s from viewsGrzegorz Nosek
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-14Fixed #17942 -- Added a JsonResponse class to more easily create JSON ↵Lukasz Balcerzak
encoded responses. Thanks leahculver for the suggestion and Erik Romijn, Simon Charette, and Marc Tamlyn for the reviews.
2014-01-14Fixed #21774 -- Isolate all test urls from eachother.Marc Tamlyn
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-03Revert "Fixed #21227 -- Added workaround for selenium test failures"Florian Apolloner
This reverts commit 08c9ab5a0f564a3ac7803e6a97fae855f2e0524e.
2013-12-23Imported override_settings from its new location.Aymeric Augustin
2013-12-23Dropped AppCache._empty, _with_app and _without_app.Aymeric Augustin
It's now easier to achieve the same effect with modify_settings or override_settings.
2013-12-23Added modify_settings to alter settings containing lists of values.Aymeric Augustin
2013-12-22Made apps available for loading traslations in a test.Aymeric Augustin
2013-12-22Moved a test that didn't require Selenium.Aymeric Augustin
2013-12-22Moved apps back in the toplevel django namespace.Aymeric Augustin
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
2013-12-22Stopped iterating on INSTALLED_APPS.Aymeric Augustin
Used the app cache's get_app_configs() method instead.
2013-12-14Fixed E127 pep8 warnings.Loic Bistuer
2013-12-07Added extra newline for flake8.Tim Graham
2013-12-07Fixed #21530 -- Prevent AttributeError in default URLconf detection code.Baptiste Mispelon
Thanks to @dmyerscoug for the report and original patch and to @alasdairnicol for the added tests.
2013-11-24Fixed #21500 -- Removed imports of deprecated utils.importlibBaptiste Mispelon
2013-11-22Fixed #21443 -- Cannot show debug info on PY3's importlibBouke Haarsma
Thanks productions@zaziork.co.uk for the review.
2013-11-03Fixed #21322 -- Error message when CSRF cookie is missingBouke Haarsma
Thanks to Henrik Levkowetz and olau for their reports and initial patches.
2013-11-02Fixed all E261 warningscoagulant
2013-11-02Fixing E302 ErrorsJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02Fixed #21302 -- Fixed unused imports and import *.Tim Graham
2013-11-02Fixed #21324 -- Translate CSRF failure viewBouke Haarsma
Thanks to Claude Paroz for the original patch.
2013-10-30Added some more tests for the debug page.Baptiste Mispelon
* Missing tests for ticket #12744 * Tests for the cleanse_setting feature (leaving out sensitive settings from the debug page)
2013-10-30Fixed #21345: Don't evaluate callable settings in the debug page.Baptiste Mispelon
Thanks to crass for the report.
2013-10-26Fix all violators of E231Alex Gaynor
2013-10-24Fixed #21227 -- Added workaround for selenium test failuresKevin Christopher Henry
Added a refresh() before quit() in the selenium tests, since this solves the problem of spurious test failures in some environments.
2013-10-22Fixed #5789 -- Changed LocaleMiddleware session variable to '_language'.Bouke Haarsma
The old 'django_language' variable will still be read from in order to migrate users. The backwards-compatability shim will be removed in Django 1.8. Thanks to jdunck for the report and stugots for the initial patch.
2013-10-19Removed unused local variables in tests.Tim Graham
2013-10-18Fixed #21287 -- Fixed E123 pep8 warningsAlasdair Nicol
2013-10-10Whitespace cleanup.Tim Graham
* Removed trailing whitespace. * Added newline to EOF if missing. * Removed blank lines at EOF. * Removed some stray tabs.
2013-09-22Partial revert of 165f44aa.Aymeric Augustin
That commit didn't always improve readability. See discussion on django-developers for details.
2013-09-18Fixed #21098 -- Applied sensitive_post_parameters to MultiValueDictTim Graham
Thanks simonpercivall for the report and bmispelon for the review.
2013-09-18Fixed #4278 -- Added a dirs parameter to a few functions to override ↵Berker Peksag
TEMPLATE_DIRS. * django.template.loader.get_template() * django.template.loader.select_template() * django.shortcuts.render() * django.shortcuts.render_to_response() Thanks amcnabb for the suggestion.
2013-09-09Removed unneeded imports in tests's __init__.py and unified them.Florian Apolloner
2013-09-07Fixed some flake8 warningsAlex Gaynor
2013-09-06Removed unnecessary, leftover importsIan Wilson
2013-09-06adds fix and test for when a template is not specified at all to render(). ↵Ian Wilson
fixes #21058. by jambonrose and ianawilson
2013-08-16Combine consecutive with statementsClaude Paroz
Python 2.7 allows to combine several 'with' instructions.
2013-08-12Unlocalize line numbers and ids in debug 500 view.Ramiro Morales
While using USE_L10N, line numbers and IDs were printed as comma (or locale equivalent) separated values. Thanks Kronuz for the report and intial patch. Fixes #20861.
2013-08-10Test that django.views.static.serve() generates 404 status codes.Ramiro Morales
Also, change tests to be based on SimpleTestCase.
2013-08-09Fixed test failures introduced by #12288Tim Graham
2013-08-04Fixed #20822 -- Set content type of default error pages to 'text/html'.Aymeric Augustin
Thanks Jimmy Song for the patch.
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-01Fixed a few more imports of django.utils.unittest.Aymeric Augustin
One import per line please! Refs #20680.
2013-07-01Stopped using django.utils.unittest in the test suite.Aymeric Augustin
Refs #20680.
2013-06-10Defined available_apps in relevant tests.Aymeric Augustin
Fixed #20483.
2013-05-30Merge pull request #1027 from intgr/debug_no_exc_messageTim Graham
Clearer explanation when exception has no message
2013-05-21Fixed #6412 -- More details if a template file cannot be loadedMathijs de Bruin
Report more details about template files in loader postmortem.
2013-05-21Use assertIsInstance in tests.Marc Tamlyn
Gives much nicer errors when it fails.
2013-05-18Fixed ff881aef on Python 3.Aymeric Augustin