Commit Graph

741 Commits

Author SHA1 Message Date
Jon Dufresne e90af8bad4 Capitalized "Python" in docs and comments. 2018-10-09 09:26:07 -04:00
Sergey Fedoseev 8ef8bc0f64 Refs #28909 -- Simplifed code using unpacking generalizations. 2018-09-28 09:57:12 -04:00
Jon Dufresne 82f286cf6f Refs #29784 -- Switched to https:// links where available. 2018-09-26 08:48:47 +02:00
Dan Palmer e181666973 Fixed #29687 -- Allowed the test client to serialize list/tuple as JSON. 2018-08-25 10:57:05 -04:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) 233c70f047 Fixed #29658 -- Registered model lookups in tests with a context manager. 2018-08-21 12:17:46 -04:00
Kamil 3d4080f19c Fixed #29024 -- Made TestContextDecorator call disable() if setUp() raises an exception. 2018-08-17 16:30:27 -04:00
Marnanel Thurman 7cc52250f0 Fixed #29662 -- Allowed test client to accept structured suffix JSON content types. 2018-08-15 10:27:45 -04:00
Sławek Ehlert c6238bf02b Fixed #29467 -- Made override_settings handle errors in setting_changed signal receivers. 2018-07-30 15:59:37 -04:00
Thng Kai Yuan 71a739f3d7 Fixed #29576 -- Corrected the test client's HTTP_COOKIE header. 2018-07-21 18:14:39 -04:00
Mariusz Felisiak a73cf8110e Removed duplicate words in various comments. 2018-07-18 11:54:15 -04:00
Tim Graham 5bea8d256d
Fixed #29553 -- Made test client set Content-Length header to a string rather than integer. 2018-07-09 11:44:49 -04:00
Claude Paroz eac9ab7ebb Removed parser.add_arguments() arguments that match the defaults. 2018-07-02 17:54:57 -04:00
Tim Graham 9294110a57 Fixed #29520 -- Fixed test client crash when posting bytes.
Regression in b8a41a2872.
2018-06-27 14:50:03 -04:00
Jan Pieter Waagmeester 24959e48d9 Fixed #27398 -- Added an assertion to compare URLs, ignoring the order of their query strings. 2018-06-20 13:26:12 -04:00
Jon Dufresne 8dcd43ce06 Restored django.test.utils.patch_logger() for backwards compatibility.
Added back after 607970f31c.
2018-06-12 11:33:16 -04:00
Morgan Aubert 704443acac Fixed #29363 -- Added SimpleTestCase.assertWarnsMessage(). 2018-05-09 11:40:28 -04:00
Claude Paroz 607970f31c Replaced django.test.utils.patch_logger() with assertLogs().
Thanks Tim Graham for the review.
2018-05-07 09:34:00 -04:00
Chris Lamb 84ad721bd9 Fixed #29275 -- Made assertFormError() output "(actual errors: none)" instead of "(actual errors: )". 2018-03-31 18:35:45 -04:00
Mariusz Felisiak 362813d628
Fixed hanging indentation in various code. 2018-03-16 10:54:34 +01:00
Sanyam Khurana 5a669ae2f4 Fixed #29106 -- Made DiscoverRunner display selected test tags. 2018-02-13 12:56:31 -05:00
Tim Graham b8a41a2872 Refs #27795 -- Removed force_bytes() in django.test.client where possible. 2018-02-12 11:03:11 -05:00
Jon Dufresne 919d59811f Refs #27795 -- Removed force_text() usage in django/test/testcases.py. 2018-02-10 11:44:39 -05:00
Nick Sarbicki 47268242b0 Fixed #29082 -- Allowed the test client to encode JSON request data. 2018-02-06 18:29:04 -05:00
Tom 272f685794 Fixed #27999 -- Added test client support for HTTP 307 and 308 redirects. 2018-02-06 09:03:43 -05:00
Jon Dufresne ff05de760c Fixed #29038 -- Removed closing slash from HTML void tags. 2018-01-21 02:09:10 -05:00
Will Ayd 09530e61a0 Fixed #28869 -- Made tagged test classes and methods inherit tags from parents. 2018-01-08 20:57:33 -05:00
Дилян Палаузов d7b2aa24f7 Fixed #28982 -- Simplified code with and/or. 2018-01-03 20:12:23 -05:00
Tim Graham acc8dd4142
Fixed #28984 -- Made assorted code simplifications. 2018-01-03 13:24:02 -05:00
Дилян Палаузов d79cf1e9e2 Fixed #28985 -- Removed unneeded None checks before hasattr(). 2018-01-03 11:37:06 -05:00
Дилян Палаузов 4c599ece57 Fixed #28930 -- Simplified code with any() and all(). 2017-12-26 17:11:15 -05:00
Nick Pope f3a98224e6 Refs #28909 -- Simplifed code using unpacking generalizations. 2017-12-21 21:05:23 -05:00
Nick Pope d13a9e44de Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking. 2017-12-11 07:08:45 -05:00
Nick Pope c68f66e014 Refs #23919 -- Replaced super() calls for old-style classes. 2017-12-07 09:10:32 -05:00
Tim Graham a862af3839
Fixed #28893 -- Removed unnecessary dict.items() calls. 2017-12-06 17:17:59 -05:00
Дилян Палаузов d2afa5eb23 Fixed #28860 -- Removed unnecessary len() calls. 2017-12-04 10:35:23 -05:00
Nicolas Delaby 746caf3ef8 Fixed #28837 -- Fixed test client crash if an exception with more than one arg is raised.
Also removed usage of the problematic pattern elsewhere.

Regression in 6e55e1d88a.
2017-11-28 18:55:23 -05:00
Jon Dufresne 7a6fbf36b1 Fixed #28853 -- Updated connection.cursor() uses to use a context manager. 2017-11-28 11:28:09 -05:00
Rachel Tobin 6c92f711ea Refs #28575 -- Allowed pickling Model.DoesNotExist and MultipleObjectsReturned classes. 2017-10-13 09:16:09 -04:00
Tim Graham 98706bb35e Refs #27857 -- Replaced json.loads() ValueError exception catching with JSONDecodeError. 2017-09-25 17:11:06 -04:00
Tim Graham cfff2af02b Fixed #27857 -- Dropped support for Python 3.4. 2017-09-25 17:11:03 -04:00
Tim Graham 9463a7a8cd Refs #26840 -- Removed django.test.runner.setup_databases() per deprecation timeline. 2017-09-22 12:51:17 -04:00
Jon Dufresne 99e65d6488 Fixed #28578 -- Renamed DatabaseCreation number arguments to suffix. 2017-09-11 11:32:40 -04:00
Luoxzhg ffbee67f8e Fixed some comments referring to a nonexistent TestClient class. 2017-09-09 11:21:15 -04:00
Tim Graham 6e4c6281db Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."
This reverts commit 550cb3a365
because try/except performs better.
2017-09-07 08:16:21 -04:00
Sergey Fedoseev 5b1c389603 Refs #23919 -- Replaced usage of django.utils.functional.curry() with functools.partial()/partialmethod(). 2017-09-06 13:11:18 -04:00
Sergey Fedoseev 481ba33cd2 Used sets for CheckRegistry.registered_checks and deployment_checks. 2017-08-24 10:37:50 -04:00
Sergey Fedoseev 30eb92fc11 Removed need for hasattr(check, 'tags') in CheckRegistry.
It was needed to pass tests because registered checks weren't properly mocked.
2017-08-21 15:34:20 -04:00
Sergey Fedoseev 6de2930078 Fixed #28360 -- Fixed test runner crash with --debug-sql on fail/error in subTest. 2017-07-05 16:56:24 -04:00
Mads Jensen 550cb3a365 Fixed #27818 -- Replaced try/except/pass with contextlib.suppress(). 2017-06-28 14:07:55 -04:00
François Freitag e36598f963 Refs #27539 -- Fixed typo in TransactionTestCase._pre_setup() comment. 2017-06-18 21:24:20 -04:00