summaryrefslogtreecommitdiff
path: root/django/contrib/sites/tests.py
AgeCommit message (Collapse)Author
2015-02-11Moved contrib.sites tests out of contrib.Tim Graham
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-12-27Fixed #24000 -- Corrected contrib.sites default site creation in a multiple ↵Tim Graham
database setup.
2014-12-01Fixed #23945 -- Made default site use the configured SITE_ID.wrwrwr
2014-12-01Fixed #23929 -- Added more tests for create_default_site.wrwrwr
Refs: #15346, #15573, #16353, #16828.
2014-11-27Fixed #23641 -- Moved post_migrate signals for contrib apps to ↵wrwrwr
AppConfig.ready().
2014-10-01Fixed #15089 -- Allowed contrib.sites to lookup the current site based on ↵Tim Graham
request.get_host(). Thanks Claude Paroz, Riccardo Magliocchetti, and Damian Moore for contributions to the patch.
2014-04-09Used more specific test assertions.Aymeric Augustin
2014-02-06Fixed #17005 -- Added CurrentSiteMiddleware to set the current site on each ↵Christopher Medrela
request. Thanks jordan at aace.org for the suggestion.
2014-01-26Moved RequestSite and get_current_site.Aymeric Augustin
Following the app-loading refactor, these objects must live outside of django.contrib.sites.models because they must be available without importing the django.contrib.sites.models module when django.contrib.sites isn't installed. Refs #21680. Thanks Carl and Loic for reporting this issue.
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-22Moved apps back in the toplevel django namespace.Aymeric Augustin
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
2013-12-22Removed the app_config.installed flag.Aymeric Augustin
Since applications that aren't installed no longer have an application configuration, it is now always True in practice. Provided an abstraction to temporarily add or remove applications as several tests messed with app_config.installed to achieve this effect. For now this API is _-prefixed because it looks dangerous.
2013-12-17Normalized Model._meta.installed.Aymeric Augustin
Used the information from the app cache instead of creating a duplicate based on INSTALLED_APPS. Model._meta.installed is no longer writable. It was a rather sketchy way to alter private internals anyway.
2013-02-24Fixed #17320 -- Added whitespace validation to the Site.domain fieldHorst Gutmann
2013-02-23Fixed #19698 -- Cleared sites cache with signalsClaude Paroz
Thanks ddavies at nomensa.com for the report and the patch and serdaroncode for reviewing the patch.
2013-02-19Added a new required ALLOWED_HOSTS setting for HTTP host header validation.Carl Meyer
This is a security fix; disclosure and advisory coming shortly.
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-01-07Fixed #17415 -- Reset database sequence for Site's pk after creating the ↵Aymeric Augustin
default site with an explicit pk. Thanks niko AT neagee net for the report, Russell and Karen for describing the fix, and Anssi for drafting the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17343 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03Updated test assertions that have been deprecated by the move to unittest2. ↵Russell Keith-Magee
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
2010-10-04Fixed #14386, #8960, #10235, #10909, #10608, #13845, #14377 - standardize ↵Luke Plant
Site/RequestSite usage in various places. Many thanks to gabrielhurley for putting most of this together. Also to bmihelac, arthurk, qingfeng, hvendelbo, petr.pulc@s-cape.cz, Hraban for reports and some initial patches. The patch also contains some whitespace/PEP8 fixes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13980 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-27Invalidate the appropriate SITE_CACHE entry when saving a Site model.Malcolm Tredinnick
This avoids the problem of, for example, saving a change to the Site model in the admin interface and then seeing the wrong instanec returned in the next call to get_current_site(). It's still possible to end up with an inconsistent cache if update() is used to change the Site model, but that's pretty unavoidable. It's also a slightly odd way to update a Site model, so if you really need to do that, you can manage to call SiteManager.clear() at the same time. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9908 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-30Fixed #8710: removed a few stray tabs. Thanks, gkelly.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-31Fixed #7978 -- Modified the contrib.sites tests to guarantee the initial ↵Russell Keith-Magee
conditions of the test match meet the requirements of the test. Thanks to Evan Schulz for the report and fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-25Fixed #7531 -- Modified the sites test so that user-provided initial data ↵Russell Keith-Magee
doesn't cause breakage when executed from within user applications. Thanks for the report, madkinder@gmail.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7738 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-22Fixed #7517 -- Added code to remove Sites from the site cache when they are ↵Russell Keith-Magee
deleted. Thanks to Marc Fargas for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7724 bcc190cf-cafb-0310-a4f2-bffc1f526a37