summaryrefslogtreecommitdiff
path: root/django/test
AgeCommit message (Collapse)Author
2014-06-16[1.7.x] Fixed #22771 -- Fixed test.Client.logout when using custom auth backend.Xavier Fernandez
Backport of 50b9313e0a from master
2014-06-09[1.7.x] Fixed flake8 errors.Tim Graham
Backport of 4b25ebf112 from master
2014-06-08[1.7.x] Fixed #22487: Optional rollback emulation for migrated appsAndrew Godwin
Conflicts: django/db/backends/creation.py django/test/runner.py docs/ref/settings.txt docs/topics/testing/advanced.txt
2014-04-28[1.7.x] Revert "Fixed #15179 -- middlewares not applied for test client login()"Tim Graham
This reverts commit 4fdd51b73240bf9c8d9472fcc45df699f0714755. See the ticket for concerns with this implementation; it will be revisited. Backport of aabceadd7d from master
2014-04-26[1.7.x] Fix many many typos in comments throughout the codebaseAlex Gaynor
Backport of 2bcb8bfc8d from master
2014-04-22[1.7.x] Fixed #22478 -- Regression in test label discovery.Preston Timmons
As part of the app-loading updates the old test runner was changed to not require a models module. This introduced a regression in behavior so applabel.TestCase failed for tests defined in a directory. The fix is thanks to yakky and rtnpro.
2014-04-12[1.7.x] Fixed #22102 -- Made SimpleTestCase tests run before ↵Claude Paroz
unittest.TestCase ones Thanks aptiko for the report and Tim Graham for the review. Backport of 3e3a7372f5 from master.
2014-03-31[1.7.x] Fixed typo in docstring.Tim Graham
Backport of 029d77eaaa from master
2014-03-09Reorganized the database test settingsShai Berger
Change database test settings from "TEST_"-prefixed entries in the database settings dictionary to setting in a dictionary that is itself an entry "TEST" in the database settings. Refs #21775 Thanks Josh Smeaton for review.
2014-03-08Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warningsClaude Paroz
Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
2014-03-03Fixed many typos in comments and docstrings.Rodolfo Carvalho
Thanks Piotr Kasprzyk for help with the patch.
2014-02-13Fixed a typo (I guess).Florian Apolloner
2014-02-10Allowed a message to be passed to assertQuerysetEqual to make it consistent ↵Chris Bailey
with other assert methods.
2014-02-07Fixed #21518 -- Made override_settings(ROOT_URLCONF) clear the resolver cache.Chris Wilson
Thanks Aymeric Augustin and Simon Charette for reviews.
2014-01-27Removed TransRealMixin.Aymeric Augustin
Fixed #21688. Refs https://github.com/django/django/pull/1147.
2014-01-27Minor cleanup.Aymeric Augustin
2014-01-26Fixed some missing/extraneous new line warnings.Simon Charette
2014-01-25Moved sys.path-extending decorator to django.test.utils and used throughout ↵Carl Meyer
test suite. Thanks Aymeric for the suggestion.
2014-01-21Refs #21831 -- Softened the TestClient dependency on contrib.auth.Russell Keith-Magee
This is to prevent an import of django.test causing an import (and thus an implicit checks regisration) for an app that may not be in `INSTALLED_APPS`. Better fixes may be possible when #20915 and/or #21829 are addressed. Thanks to @carljm for the report.
2014-01-20Fixed #16905 -- Added extensible checks (nee validation) frameworkRussell Keith-Magee
This is the result of Christopher Medrela's 2013 Summer of Code project. Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian Apolloner, and Alex Gaynor for review notes along the way. Also: Fixes #8579, fixes #3055, fixes #19844.
2014-01-16Fixed #21740 -- Stopped using mutable default arguments in test clientClaude Paroz
Thanks Denver Coneybeare for the report and initial patch, and Atala for another patch.
2014-01-09Fixed #12571 -- Attached originating WSGIRequest to test client responses.Unai Zalakain
Originating WSGIRequests are now attached to the ``wsgi_request`` attribute of the ``HttpResponse`` returned by the testing client. Thanks rvdrijst for the suggestion.
2014-01-06Fixed #21718 -- Renamed has_app to is_installed.Aymeric Augustin
2014-01-01Wiped get_commands() cache when INSTALLED_APPS changes.Aymeric Augustin
Refs #21018, #21688.
2014-01-01Fixed #21206 -- Fixed test discovery without labelsPreston Timmons
Added test to verify an empty label performs discovery on the current working directory.
2013-12-29Cleared global templatetags module cache.Florian Apolloner
TOOOOO MUCH GLOBAL STATE (you didn't see that).
2013-12-27Properly app_template_dirs when INSTALLED_APPS change.Florian Apolloner
2013-12-26Made the AppConfig API marginally more consistent.Aymeric Augustin
Eliminated the app_ prefix that was more confusing than useful.
2013-12-26Fixed #21206 -- No longer run discovery if the test label doesn't point to a ↵Preston Timmons
package or directory. Thanks thepapermen for the report and Carl Meyer for the review.
2013-12-24Renamed AppCache to Apps.Aymeric Augustin
Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-24Fixed override_settings when set_available_apps raises an exception.Aymeric Augustin
Previously, this would corrupt the settings, because __exit__ isn't called when __enter__raises an exception.
2013-12-23Added modify_settings to alter settings containing lists of values.Aymeric Augustin
2013-12-23Refactored INSTALLED_APPS overrides.Aymeric Augustin
* Introduced [un]set_installed_apps to handle changes to the INSTALLED_APPS setting. * Refactored [un]set_available_apps to share its implementation with [un]set_installed_apps. * Implemented a receiver to clear some app-related caches. * Removed test_missing_app as it is basically impossible to reproduce this situation with public methods of the new app cache.
2013-12-22Moved apps back in the toplevel django namespace.Aymeric Augustin
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
2013-12-22Complained on override_settings(INSTALLED_APPS=...).Aymeric Augustin
Currently such overrides aren't reflected in the app cache. It would be possible to handle them. But that doesn't look like a very good API. It makes it complicated to express "add this app" and "remove this app", which are the most common operations on INSTALLED_APPS.
2013-12-22Stop testing for inclusion in INSTALLED_APPS.Aymeric Augustin
Removed some exception masking in the comments app that was harmful and couldn't be preserved easily.
2013-12-20Set stacklevel for the override_settings warning.Aymeric Augustin
Refs #19031.
2013-12-17Moved the new app cache inside core.Aymeric Augustin
2013-12-17Refactored old test runner to handle apps without a models module.Aymeric Augustin
2013-12-17Deprecated get_app().Aymeric Augustin
2013-12-17Deprecated get_apps().Aymeric Augustin
2013-12-17Removed module-level functions for the app cache.Aymeric Augustin
Since the original ones in django.db.models.loading were kept only for backwards compatibility, there's no need to recreate them. However, many internals of Django still relied on them. They were also imported in django.db.models. They never appear in the documentation, except a quick mention of get_models and get_app in the 1.2 release notes to document an edge case in GIS. I don't think that makes them a public API. This commit doesn't change the overall amount of global state but clarifies that it's tied to the app_cache object instead of hiding it behind half a dozen functions.
2013-12-17Moved django.db.models.loading to django.apps.cache.Aymeric Augustin
This commit doesn't contain any code changes; it's purely a refactoring.
2013-12-14Fixed E127 pep8 warnings.Loic Bistuer
2013-12-11Fixed #21462 -- Made `assertNumQueries` print executed queries on failure.Dominic Rodger
2013-12-10Fixed E124 pep8 warnings.Loic Bistuer
2013-11-28Fixed E125 pep8 warningsChristopher Medrela
2013-11-26Fixed #21448 -- Fixed test client logout with cookie-based sessionsClaude Paroz
Thanks Gunnar Scherf for the report and the suggested patch.
2013-11-25Fixed #21509 -- Removed dead exception catching code.Krzysztof Jurewicz
Since Python 2.5, KeyboardInterrupt and SystemExit are not subclasses of Exception, so explicitly reraising them before the “except Exception” clause is not necessary anymore.
2013-11-23Fixed #21012 -- New API to access cache backends.Curtis Maloney
Thanks Curtis Malony and Florian Apolloner. Squashed commit of the following: commit 3380495e93f5e81b80a251b03ddb0a80b17685f5 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 14:18:07 2013 +0100 Looked up the template_fragments cache at runtime. commit 905a74f52b24a198f802520ff06290a94dedc687 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 14:19:48 2013 +0100 Removed all uses of create_cache. Refactored the cache tests significantly. Made it safe to override the CACHES setting. commit 35e289fe9285feffed3c60657af9279a6a2cfccc Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 12:23:57 2013 +0100 Removed create_cache function. commit 8e274f747a1f1c0c0e6c37873e29067f7fa022e8 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 12:04:52 2013 +0100 Updated docs to describe a simplified cache backend API. commit ee7eb0f73e6d4699edcf5d357dce715224525cf6 Author: Curtis Maloney <curtis@tinbrain.net> Date: Sat Oct 19 09:49:24 2013 +1100 Fixed #21012 -- Thread-local caches, like databases.