summaryrefslogtreecommitdiff
path: root/tests/admin_scripts
AgeCommit message (Collapse)Author
2015-02-23[1.8.x] Guaranteed removal of temporary files during tests.Aymeric Augustin
Dropped the DJANGO_TEST_TEMP_DIR environment variable. Before this change, proper removal depended on the developer passing dir=os.environ['DJANGO_TEST_TMP_DIR'] to tempfile functions. Backport of 934400759de817471ff37d736686201d7ae34e82 from master
2015-02-17[1.8.x] Refs #24324 -- Fixed Python 2 test failures when path to Django ↵Tim Graham
source contains non-ASCII characters. Backport of 307c0f299a6c26f5231d3516df5b4edc54b36553 from master
2015-02-11[1.8.x] Prevented some test commands from needlessly running system checks.Tim Graham
This is a performance optimization and also fixes test errors with the upcoming merge of contrib tests into tests/. The tests failed on MySQL because the models with GeometryField were being checked but the non-GIS MySQL backend didn't know how to handle them. Backport of 197dd4b8f12164f6acebb3b959f9ac2040a40400 from master
2015-02-09[1.8.x] Sorted imports with isort; refs #23860.Tim Graham
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
2014-12-30Applied ignore_warnings to Django testsClaude Paroz
2014-12-29Fixed #21255 -- Closed connections after management command ranClaude Paroz
Thanks kabakov.as@gmail.com for the report, and Aymeric Augustin, Simon Charette for the reviews.
2014-12-26Removed an unnecessary models file in the admin_scripts tests.Tim Graham
2014-12-26Replaced sqlall in some bash_completion/admin_scripts tests.Tim Graham
sqlall will be removed in Django 1.9, so now's a good time to remove its usage where it's not important.
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-10-22Refactored color_style() and no_style() to improve testability. Refs #23663.Loic Bistuer
This includes the following improvements: - The type of the style object is now called 'Style' rather than 'dummy'. - The new make_style() function allows generating a Style object directly from a config string. Before the only way to get a style object was through the environ and it also required that the terminal supported colors which isn't necessarily the case when testing. - The output of no_style() is now cached with @lru_cache. - The output of no_style() now has the same set of attributes as the other Style objects. Previously it allowed anything to pass through with __getattr__.
2014-10-22Fixed #23686 -- Tweak color output of the system check framework.Loic Bistuer
Thanks Tim Graham for the review.
2014-10-22Made testing of stdout and stderr more consistent.Loic Bistuer
Refs #23663.
2014-10-22Fixed #23663 -- Initialize output streams for BaseCommand in __init__().Loic Bistuer
This helps with testability of management commands. Thanks to trac username daveoncode for the report and to Tim Graham and Claude Paroz for the reviews.
2014-10-22Fixed #23107 -- Made runserver output respect --no-color.Loic Bistuer
This commit reverts 67d7da5fb9498b811f0168f5df2308ad4743027f. The previous fix changed the environment globally, which meant that any call to `call_command(no_color=True)` prevented further `call_command` with color. This fix still relies on the environment because it's currently the only way to reach WSGIRequestHandler, but it's now limited to the `runserver` command. This seems an acceptable compromise considering `runserver` runs indefinitely. Thanks Tim Graham for the review.
2014-09-17Fixed #23495 -- Stopped swallowing real settings import errorClaude Paroz
Thanks papaloizouc for the report.
2014-08-18Fixed #23136 -- Added a message when sqlclear does nothingGabriel Muñumel
2014-08-12Fixed #23276 -- Deprecated passing views as strings to url().Tim Graham
2014-07-30Fixed #23107 -- Made runserver output respect --no-color.areski
2014-06-19Fixed #22835 -- Deprecated NoArgsCommand.Maxime Turcotte
2014-06-14Fixed #7762 -- Hidden full script name in command error outputClaude Paroz
2014-06-14Restored command error behavior when called from command lineClaude Paroz
Refs #19973.
2014-06-14Fixed several flake8 errorsAlex Gaynor
2014-06-14Converted remaining management commands to argparseClaude Paroz
2014-06-14Fixed #19973 -- Replaced optparse by argparse in management commandsClaude Paroz
Thanks Tim Graham for the review.
2014-06-13Fixed #22477 -- Removed contrib middleware from the global settings defaults.mlavin
Also added a compatibility check for changed middleware defaults. Forwardport of d94de802d3 from stable/1.7.x
2014-05-27Fixed #22699 -- Configure default settings in some management commands.Aymeric Augustin
This makes it possible to run django.setup() in management commands that don't need a settings module. In addition it simplifies error handling. Thanks Claude for the review.
2014-05-16Fixed #21634 -- Prevented hiding ImproperlyConfigured when command not foundClaude Paroz
Thanks nikolay.v.golub@gmail.com for the report.
2014-04-26Fix many many typos in comments throughout the codebaseAlex Gaynor
2014-04-06Fixed #21977 -- Deprecated SimpleTestCase.urlsAnubhav Joshi
2014-04-03Fixed #22218 -- Deprecated django.conf.urls.patterns.Tim Graham
Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
2014-03-11Fixed test failures on Windows.Tim Graham
refs #21092 and 8d7e048a8b428bebe82be735a84570f9250441e6
2014-03-08Improved compatibility in admin_scripts testsClaude Paroz
Environment keys/values need to use native strings on some plateforms. Thanks anubhav joshi for detecting the issue and helping shaping the patch.
2014-03-08Fixed #21092 -- Ensured admin_scripts tests are run with warnings offClaude Paroz
2014-03-08Avoided modifying current environment in admin_scripts testsClaude Paroz
2014-03-03Fixed many typos in comments and docstrings.Rodolfo Carvalho
Thanks Piotr Kasprzyk for help with the patch.
2014-02-18Fixed #22057 -- Ensured reverse_lazy can be used in settingsClaude Paroz
And without causing a circular import. Thanks Akis Kesoglou for the report.
2014-01-28Fixed #21849 -- Included the count of silenced system checks in output.Tim Graham
2014-01-25Fixed #21829 -- Added default AppConfigs.Aymeric Augustin
Thanks Russell for the report, Marc for the initial patch, Carl for the final review, and everyone who contributed to the design discussion.
2014-01-20Added warning silencers to some noisy tests.Russell Keith-Magee
These warnings all emerged as the result of the introduction of the checks framework. Thanks to Anssi Kääriäinen 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-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-01Fixed #21018 -- Reversed precedence order for management commands.Aymeric Augustin
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-22Deprecated load_app().Aymeric Augustin
Adjusted several tests that used it to add apps to the app cache and then attempted to remove them by manipulating attributes directly. Also renamed invalid_models to invalid_models_tests to avoid clashing application labels between the outer and the inner invalid_models applications.
2013-12-22Removed the only_installed argument of get_app_config[s].Aymeric Augustin
It wasn't used anywhere and couldn't be implemented any more since non-installed apps no longer have a configuration.
2013-12-17Removed superfluous models.py files.Aymeric Augustin
Added comments in the three empty models.py files that are still needed. Adjusted the test runner to add applications corresponding to test labels to INSTALLED_APPS even when they don't have a models module.
2013-12-17Added get_app_config() to look up app configs by label.Aymeric Augustin
Refactored get_app() to rely on that method. get_app() starts by calling _populate(), which goes through INSTALLED_APPS and, for each app, imports the app module and attempts to import the models module. At this point, no further imports are necessary to return the models module for a given app. Therefore, the implementation of get_app() can be simplified and the safeguards for race conditions can be removed. Besides, the emptyOK parameter isn't used anywhere in Django. It was introduced in d6c95e93 but not actually used nor documented, and it has just been carried around since then. Since it's an obscure private API, it's acceptable to stop supporting it without a deprecation path. This branch aims at providing first-class support for applications without a models module eventually. For backwards-compatibility, get_app() still raises ImproperlyConfigured when an app isn't found, even though LookupError is technically more correct. I haven't gone as far as to preserve the exact error messages. I've adjusted a few tests instead.
2013-11-02PEP8 cleanupJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02Fixed #21302 -- Fixed unused imports and import *.Tim Graham