summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-01-01Fixed #21018 -- Reversed precedence order for management commands.Aymeric Augustin
2014-01-01Removed unused function in test_runner testsPreston Timmons
This was used for python 2.6 and unittest2 compatibility. It was forgotten when the code that used it was removed.
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-31Fixed #21581 -- Fixed a number of issues with collectstatic.Loic Bistuer
When STATIC_ROOT wasn't set, collectstatic --clear would delete every files within the current directory and its descendants. This patch makes the following changes: Prevent collectstatic from running if STATIC_ROOT isn't set. Fixed an issue that prevented collectstatic from displaying the destination directory. Changed the warning header to notify when the command is run in dry-run mode.
2013-12-31Fixed #21714 -- Moved logging configuration to global setup()Claude Paroz
Thanks Aymeric Augustin for the report and the review.
2013-12-31Enforced unicity of app labels.Aymeric Augustin
Fixed #21679.
2013-12-31Made it possible to change an application's label in its configuration.Aymeric Augustin
Fixed #21683.
2013-12-31Removed an obsolete unicity check.Aymeric Augustin
It doesn't account for app configs. Refs #21679.
2013-12-31Made DeprecationDisplayTest more robustClaude Paroz
2013-12-31Finished renaming syndication to syndication_testsClaude Paroz
2013-12-31Renamed syndication testsClaude Paroz
To resolve the conflict between application names.
2013-12-30Removed the only_with_models_module argument of get_model[s].Aymeric Augustin
Now that the refactorings are complete, it isn't particularly useful any more, nor very well named. Let's keep the API as simple as possible. Fixed #21689.
2013-12-30Merge pull request #2126 from apollo13/email_bytesFlorian Apolloner
Many thanks to @bitdancer and @aaugustin for answering my stupid questions about (mail)encodings and pointing me in the right direction.
2013-12-30Changed console and filebackend to use msg.as_bytes to output the data as it ↵Florian Apolloner
would get send via smtp.
2013-12-30Stopped populating the app registry as a side effect.Aymeric Augustin
Since it triggers imports, it shouldn't be done lightly. This commit adds a public API for doing it explicitly, django.setup(), and does it automatically when using manage.py and wsgi.py.
2013-12-30Populated Apps instances immediately by default.Aymeric Augustin
2013-12-29Deprecated the app argument of apps.get_models.Aymeric Augustin
Use app_config.get_models() instead.
2013-12-29Changed get_validation_errors to use an app config.Aymeric Augustin
2013-12-29Changed sql_* to use an app config instead of a models module.Aymeric Augustin
2013-12-29Used Apps.clear_cache() in tests that alter the app registry.Aymeric Augustin
2013-12-29Refactored the migration signals to use app configs.Aymeric Augustin
De-aliased pre/post_syncdb to pre/post_migrate to increase backwards-compatibility.
2013-12-28Fixed #21242 -- Allowed more IANA schemes in URLValidatorClaude Paroz
Thanks Sascha Peilicke for the report and initial patch, and Tim Graham for the review.
2013-12-28Removed the only_installed argument of Apps.get_models.Aymeric Augustin
Refs #15903, #15866, #15850.
2013-12-28Changed get_model to raise an exception on errors.Aymeric Augustin
Returning None on errors required unpythonic error checking and was inconsistent with get_app_config. get_model was a private API until the previous commit, but given that it was certainly used in third party software, the change is explained in the release notes. Applied the same change to get_registered_model, which is a new private API introduced during the recent refactoring.
2013-12-28Stopped calling apps.get_model with only_installed=False.Aymeric Augustin
ContentTypes are only created for installed applications, and I could make a case for not returning a model that isn't installed any more. The check for stale ContentTypes in update_contenttypes doesn't use model_class. ModelSignal actually needs get_registered_model since the lookup happens at import time. I took this opportunity to perform a small refactoring.
2013-12-28Populated non-master app registries.Aymeric Augustin
This removes the gap between the master app registry and ad-hoc app registries created by the migration framework, specifically in terms of behavior of the get_model[s] methods. This commit contains a stealth feature that I'd rather not describe.
2013-12-28Introduced as_bytes for SafeMIMEText (and other SafeMIME-classes).Florian Apolloner
This is to provide a consistent interface (namely bytes) for the smtp backend which after all sends bytes over the wire; encoding with as_string yields different results since mails as unicode are not really specified. as_string stays for backwardscompatibilty mostly and some debug outputs. But keep in mind that the output doesn't match as_bytes!
2013-12-28Fixed #20346 -- Made cache middleware vary on the full URL.ijl
Previously, only the URL path was included in the cache key. Thanks jamey for the suggestion.
2013-12-28Used app_label instead of appname.Aymeric Augustin
The last component of the dotted path to the application module is consistently referenced as the application "label". For instance it's AppConfig.label. appname could be confused with AppConfig.name, which is the full dotted path.
2013-12-28Migrated built-in AppCommands to use handle_app_config.Aymeric Augustin
2013-12-27Amend test table name so it doesn't clash.Ramiro Morales
Refs #21692 and 3efd1b8b939.
2013-12-27Fixed #21692 -- Quote table name when creating it.Ramiro Morales
2013-12-27Fixed a couple flake8 warnings.Aymeric Augustin
2013-12-26Added a test for Apps.has_app.Aymeric Augustin
2013-12-26Added file forgotten in previous commit, plus one more test.Aymeric Augustin
2013-12-26Added tests for invalid values of INSTALLED_APPS.Aymeric Augustin
2013-12-26Added basic tests for get_app_config[s].Aymeric Augustin
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-26Turned apps.ready into a property. Added tests.Aymeric Augustin
2013-12-26Removed a few gratuitous lambdas.Aymeric Augustin
2013-12-25Fixed unittest typoLevi Gross
2013-12-24Added a missing import and removed an unneeded importAlex Gaynor
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-24Replaced ad-hoc caching of get_models with lru_cache.Aymeric Augustin
Invalidate properly the cache whenever all_models or app_configs change. This fixes some isolation issues in the test suite.
2013-12-23Renamed two tests so they actually run.Aymeric Augustin
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-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-22Fixed a flaky test.Aymeric Augustin