summaryrefslogtreecommitdiff
path: root/tests/logging_tests
AgeCommit message (Collapse)Author
2020-05-08Fixed tests isolation in logging_tests.François Freitag
The SetupConfigureLogging test case does not restore the logging config after its execution. It leaves the logger django.request with an empty handlers array. This also removes the last use of LOGGING_CONFIG, introduced in 43503b093a35ca4707c16d865f10929960bfa0b8.
2020-04-16Fixed #29329 -- Made datetime logging from runserver more consistent.Hasan Ramezani
Setting default_msec_format=None will make it the same, unfortunately it's not supported by Python, see https://bugs.python.org/issue40300.
2019-10-29Used more specific unittest assertions in tests.Nick Pope
* assertIsNone()/assertIsNotNone() instead of comparing to None. * assertLess() for < comparisons. * assertIs() for 'is' expressions. * assertIsInstance() for isinstance() expressions. * rounding of assertAlmostEqual() for round() expressions. * assertIs(..., True/False) instead of comparing to True/False. * assertIs()/assertIsNot() for ==/!= comparisons. * assertNotEqual() for == comparisons. * assertTrue()/assertFalse() instead of comparing to True/False.
2019-09-04Fixed #29714 -- Allowed using ExceptionReporter subclass with AdminEmailHandler.Nasir Hussain
2019-04-24Removed unnecessary assignments in various code.Jon Dufresne
2019-02-05Simplified temporary directory handling in AdminScriptTestCase.Jon Dufresne
Use tempfile.TemporaryDirectory() in AdminScriptTestCase.setUp() to create and destroy a temporary directory for each test. It removes the need for individual tests to delete files. For test classes that don't use the temporary directory, inherit from SimpleTestCase.
2019-01-02Used 4 space hanging indent for dictionaries.Tim Graham
Thanks Mariusz Felisiak for auditing.
2018-12-31Updated test URL patterns to use path() and re_path().Tim Graham
2018-11-27Made reused RequestFactory instances class attributes.Simon Charette
2018-10-16Refs #23919 -- Removed a stray object-inheritance.Mads Jensen
Follow up to 081e78716085ff4af08604af5d084c8fd27c0730.
2018-05-04Fixed #26688 -- Fixed HTTP request logging inconsistencies.Samir Shah
* Added logging of 500 responses for instantiated responses. * Added logging of all 4xx and 5xx responses.
2018-03-16Fixed hanging indentation in various code.Mariusz Felisiak
2018-03-14Moved SchemaLoggingTest to tests/schema.Tim Graham
2017-02-09Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().Tim Graham
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-12-07Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.Tim Graham
2016-11-14Fixed E305 flake8 warnings.Ramin Farajpour Cami
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-11-10Removed an obsolete (as of refs #25999) logging test from refs #18985.Tim Graham
2016-09-27Fixed #27271 -- Fixed a crash in runserver logging.Sergey Fursov
Allowed ServerFormatter to handle simple string messages or messages with formatting arguments. The formatter will set the server_time variable on the log record if it's required by the format string but wasn't passed in extra parameters.
2016-06-16Fixed #26747 -- Used more specific assertions in the Django test suite.Jon Dufresne
2016-05-17Fixed #26601 -- Improved middleware per DEP 0005.Florian Apolloner
Thanks Tim Graham for polishing the patch, updating the tests, and writing documentation. Thanks Carl Meyer for shepherding the DEP.
2016-05-10Stopped truncating AdminEmailHandler message subjectsClaude Paroz
Refs #26572, #17281. The RFC doesn't limit total length, just the line length which is already taken care of by Python itself. Thanks Tim Graham for the review.
2016-04-20Fixed #26504 -- Avoided logging "Not Found" warnings if a middleware handles ↵Carl Worth
the 404. For example, this avoids a warning in the case of a request that's redirected to a language-prefixed URL by LocaleMiddleware.
2016-04-20Added tests for logging of Http404 warnings.Carl Worth
2016-04-20Used @override_settings decorator rather than "with" to reduce indentation.Carl Worth
2016-04-08Fixed E128 flake8 warnings in tests/.Tim Graham
2016-03-15Fixed #26157 #25321 -- Added sql/params to extra context of schema loggerMarkus Holtermann
Thanks Akshesh Doshi for the initial patch and Tim Graham for the review
2016-01-14Fixed #25999 -- Removed promotion of RemovedInNextVersionWarning to loud by ↵Tim Graham
default.
2015-09-23Refs #24526 -- Made the django logger handle INFO messages.Tim Graham
Without an explicit 'level', only messages at WARNING or higher are handled. This makes the config consistent with the docs which say, "The django catch-all logger sends all messages at the INFO level or higher to the console."
2015-09-04Fixed #25099 -- Fixed crash in AdminEmailHandler on DisallowedHost.Vlastimil Zíma
2015-07-13Fixed #25099 -- Cleaned up HttpRequest representations in error reporting.Vlastimil Zíma
2015-05-20Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette
2015-04-24Fixed #24526 -- Combined django.request/security loggers with the root logger.Tim Graham
Thanks Carl Meyer for review.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-03Fixed #24149 -- Normalized tuple settings to lists.darkryder
2015-01-17Removed the validate management command per deprecation timeline.Tim Graham
2015-01-08Fixed #24095 -- Prevented WarningLoggerTests from leaking a warnings filter.Tim Graham
2014-11-29Fixed #23923 -- Promoted Django's deprecation warnings to errors in runtests.pyTim Graham
2014-11-15Fixed #22407 -- Added AdminEmailHandler.send_mail().Berker Peksag
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-10-21Fixed #23653 -- Fixed Windows failure of a logging test added in refs #23569.Tim Graham
2014-10-20Fix SettingsCustomLoggingTest on Windows when path contains \uMichael Manfre
2014-10-06Fixed #23593 -- Fixed crash in AdminEmailHandler with non-ASCII characters ↵Tim Graham
in request. Thanks edevil for the report and Simon Charette for review.
2014-09-30Fixed #23569 -- Allowed using configs besides dictConfig in LOGGING_CONFIG.Seth Hill
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.