Robert Rollins
b6d4b6e544
Fixed #28212 -- Allowed customizing the port that LiveServerTestCase uses.
...
Forwardport of 877d7b71ae
from stable/1.11.x
2017-05-30 18:49:10 -04:00
Claude Paroz
43c65e0eb0
Fixed #28180 -- Numbered queries in assertNumQueries failure output
...
Thanks Tim Graham for the test part.
2017-05-20 15:11:09 +02:00
François Freitag
98b3b14a64
Fixed #28203 -- Ignored connection configuration queries in assertNumQueries().
2017-05-18 11:48:03 -04:00
João Silva
3db84b5526
Fixed #28081 -- Stopped setting Content-Length=0 in conditional_content_removal() per RFC 7230.
2017-05-09 14:55:03 -04:00
Tim Graham
60dce33ab1
Removed obsolete django.test.utils.strip_quotes().
...
Django's test runners no longer discover doctests.
2017-04-27 20:32:12 -04:00
Jon Dufresne
7be94e0335
Replaced set |= operator with update() to avoid temporary set.
2017-04-27 08:16:19 -04:00
Jon Dufresne
7bbb5161ea
Removed implicit default store_true/false argparse args.
...
argparse automatically sets the default value for store_true/false
arguments to its opposite.
2017-04-01 20:03:56 -04:00
Claude Paroz
145f6c3ed6
Refs #27622 -- Fixed a regression in JSON content-type detection
...
A JSON Content-Type can contain further content, like charset for example.
2017-03-07 16:44:15 +01:00
Anton Samarchyan
86de930f41
Refs #27656 -- Updated remaining docstring verbs according to PEP 257.
2017-03-04 10:02:06 -05:00
Chris Lamb
339d526d55
Fixed #27873 -- Fixed crash in setup_test_environment() if ALLOWED_HOSTS is a tuple.
...
Regression in 17e661641d
2017-02-24 13:58:56 -05:00
Vytis Banaitis
3dcc351691
Refs #23919 -- Used yield from.
2017-02-23 20:06:01 -05:00
Tim Graham
3f5a35d6e2
Added TransactionTestCase.multi_db instead of using getattr().
2017-02-13 08:46:00 -05:00
Nadège Michel
bece837829
Fixed #20238 -- Added threading support to LiveServerTestCase.
2017-02-09 19:08:32 -05:00
Chronial
03281d8fe7
Fixed #26005 -- Fixed some percent decoding cases in uri_to_iri().
2017-02-09 09:22:00 -05:00
Tim Graham
500532c95d
Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().
2017-02-09 09:03:47 -05:00
Vytis Banaitis
8838d4dd49
Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.
2017-02-01 11:41:56 -05:00
Vytis Banaitis
d1bab24e01
Refs #23919 , #27778 -- Removed obsolete mentions of unicode.
2017-01-26 08:19:27 -05:00
Tim Graham
1c466994d9
Refs #23919 -- Removed misc Python 2/3 references.
2017-01-25 13:59:25 -05:00
chillaranand
d6eaf7c018
Refs #23919 -- Replaced super(ClassName, self) with super().
2017-01-25 12:23:46 -05:00
Jon Dufresne
0d74c41981
Replaced dict() usage with dict literals.
...
Literals are faster and more idiomatic.
2017-01-23 19:13:49 -05:00
Claude Paroz
6e55e1d88a
Refs #23919 -- Replaced six.reraise by raise
2017-01-22 20:08:04 +01:00
Tim Graham
d170c63351
Refs #23919 -- Removed misc references to Python 2.
2017-01-21 20:02:00 -05:00
Tim Graham
9e6e32bf5d
Refs #23919 -- Removed django.utils.decorators.available_attrs() usage.
...
It's only needed to workaround a bug on Python 2.
2017-01-21 13:20:17 -05:00
Tim Graham
7aba69145d
Refs #23919 -- Removed django.test.mock Python 2 compatibility shim.
2017-01-20 08:17:20 -05:00
Claude Paroz
042b7350a0
Refs #23919 -- Removed unneeded str() calls
2017-01-20 14:13:55 +01:00
Claude Paroz
dc8834cad4
Refs #23919 -- Removed unneeded force_str calls
2017-01-20 08:44:31 +01:00
Tim Graham
e5c67f0991
Refs #23919 -- Removed reset_warning_registry() workaround for Python < 3.4.2.
2017-01-19 10:56:00 -05:00
Simon Charette
cecc079168
Refs #23919 -- Stopped inheriting from object to define new style classes.
2017-01-19 08:39:46 +01:00
Aymeric Augustin
eb422e476f
Refs #23919 -- Removed obsolete __ne__() methods.
...
__ne__() defaults to the opposite of __eq__() on Python 3
when it doesn't return NotImplemented.
2017-01-18 21:44:00 -05:00
Claude Paroz
2b281cc35e
Refs #23919 -- Removed most of remaining six usage
...
Thanks Tim Graham for the review.
2017-01-18 21:33:28 +01:00
Claude Paroz
7b2f2e74ad
Refs #23919 -- Removed six.<various>_types usage
...
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz
c716fe8782
Refs #23919 -- Removed six.PY2/PY3 usage
...
Thanks Tim Graham for the review.
2017-01-18 16:21:28 +01:00
Claude Paroz
f3c43ad1fd
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
2017-01-18 13:44:34 +01:00
Claude Paroz
d7b9aaa366
Refs #23919 -- Removed encoding preambles and future imports
2017-01-18 09:55:19 +01:00
Tim Graham
7510b872e7
Refs #25190 -- Removed callable_obj parameter to assertRaisesMessages().
...
Per deprecation timeline.
2017-01-17 20:52:01 -05:00
Tim Graham
0f454f5d4d
Refs #23960 -- Removed the host parameter for SimpleTestCase.assertRedirects().
...
Per deprecation timeline.
2017-01-17 14:09:28 -05:00
François Freitag
f3b7c05936
Refs #16614 -- Made QuerySet.iterator() use server-side cursors on PostgreSQL.
...
Thanks to Josh Smeaton for the idea of implementing server-side cursors
in PostgreSQL from the iterator method, and Anssi Kääriäinen and Kevin
Turner for their previous work. Also Simon Charette and Tim Graham for
review.
2017-01-11 09:25:37 -05:00
Tim Graham
8516f7c49b
Fixed #27698 -- Added django.test.utils.ContextList.get()
2017-01-06 19:23:42 -05:00
Adam Chainz
5eff8a7783
Fixed #25415 -- Made DiscoverRunner run system checks.
2016-12-29 12:33:24 -05:00
Anton Samarchyan
0b5d4c49d6
Fixed #27622 -- Allowed test client to accept vendor tree JSON content types.
2016-12-29 08:32:15 -05:00
Preston Timmons
b52c73008a
Fixed #15667 -- Added template-based widget rendering.
...
Thanks Carl Meyer and Tim Graham for contributing to the patch.
2016-12-27 17:50:10 -05:00
Claude Paroz
1206d7fa57
Refs #25753 -- Reset l10n cache when format settings change
...
Thanks Jaap Roes for the initial patch.
2016-12-21 17:40:08 +01:00
Tim Graham
b5f0b3478d
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
2016-12-07 17:42:31 -05:00
Anton Samarchyan
47744a0a4e
Fixed #27542 -- Made Client.force_login() skip auth backends without get_user().
2016-12-01 09:50:08 -05:00
Aymeric Augustin
cb7bbf97a7
Fixed #25966 -- Made get_user_model() work at import time.
...
This makes it equivalent to: `from django.contrib.auth.models import User`.
Thanks Aymeric Augustin for the initial patch and Tim Graham for the
review.
2016-11-25 14:15:49 +01:00
Adam Chainz
22a60f8d0b
Fixed #27513 -- Made Signal.send()/send_robust() a tiny bit faster.
2016-11-22 09:30:14 -05:00
Adam Chainz
19e2114634
Fixed #27516 -- Made test client's response.json() cache the parsed JSON.
2016-11-21 08:14:03 -05:00
Tom Scrace
5549e89b84
Fixed #27184 -- Allowed uploading TemporaryFile with the test client.
...
Thanks Federico Capoano for finishing the patch.
2016-11-09 05:33:22 -05:00
Adam Wróbel
52188a5ca6
Fixed #27301 -- Prevented exceptions that fail unpickling from crashing the parallel test runner.
2016-10-06 15:54:38 -04:00
Tim Graham
8119b679eb
Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.
...
http://bugs.python.org/issue27364
2016-09-17 15:44:06 -04:00
Simon Charette
18c72d59e0
Fixed #27214 -- Made skip db features decorators respect wrapping order and inheritance.
2016-09-13 14:12:20 -04:00
Adam Zapletal
ca2ccf54ff
Fixed #24112 -- Fixed assertInHTML()'s counting if needle has no root element.
2016-08-31 20:41:34 -04:00
Chris Jerdonek
42dcceba61
Fixed #26942 -- Added support for subtests during parallel testing.
2016-08-26 14:24:27 -04:00
Berker Peksag
a02b5848ae
Replaced property() usage with decorator in several places.
2016-08-25 20:06:22 -04:00
Chris Jerdonek
f6cd669ff2
Fixed #22414 -- Ensured that LiveServerTestCase closes connections.
2016-08-19 12:47:41 -04:00
Chris Jerdonek
3d0a3c5fff
Fixed #27077 -- Made SQLite's in-memory database checks DRYer.
2016-08-17 20:34:18 -04:00
Andreas Pelme
e76981b433
Fixed #26840 -- Added test.utils.setup/teardown_databases().
2016-08-17 13:55:04 -04:00
Chris Jerdonek
48ede58971
Fixed #27057 -- Made setup_test_environment() store saved settings in one place.
2016-08-15 13:53:06 -04:00
Chris Jerdonek
5890b1613c
Fixed #27008 -- Added --debug-mode option to DiscoverRunner.
2016-08-12 20:43:17 -04:00
Chris Jerdonek
7f9fd42b93
Fixed #27019 -- Made teardown_test_environment() restore the old DEBUG.
2016-08-10 16:24:41 -04:00
Chris Jerdonek
a3a5ef4d0e
Fixed #27035 -- Eased changing settings.DEBUG for DiscoverRunner.
2016-08-09 13:40:29 -04:00
Chris Jerdonek
e7fb724cd2
Fixed #27032 -- Prevented setup_test_environment() from being called twice.
2016-08-08 10:40:29 -04:00
Adam Zapletal
2a11d2d7a7
Fixed #27028 -- Clarified failed parallel tests message.
2016-08-08 09:24:14 -04:00
Ben Demboski
fc8f097117
Fixed #27027 -- Restored Client.force_login() defaulting to the first auth backend.
2016-08-06 08:41:41 -04:00
Chris Jerdonek
42f9d65107
Edited docs of test.utils.setup/teardown_test_environment().
2016-08-05 17:38:49 -04:00
Chris Jerdonek
ebed9ee8d5
Fixed #26981 -- Added DiscoverRunner.get_test_runner_kwargs().
2016-08-04 14:45:44 -04:00
Chris Jerdonek
ef92ed530e
Fixed #26980 -- Added ParallelTestSuite.runner_class to aid subclassing.
2016-08-02 14:15:06 -04:00
Chris Jerdonek
013ee21cf8
Fixed #26976 -- Added LiveServerTestCase.server_thread_class to ease subclassing.
2016-08-01 16:15:41 -04:00
Dmitry Dygalo
d7a097265b
Fixed #26922 -- Fixed SimpleTestCase.assertHTMLEqual() crash on Python 3.5+.
2016-07-21 14:01:23 -04:00
Tim Graham
81cdcb66bc
Fixed #26791 -- Replaced LiveServerTestCase port ranges with binding to port 0.
2016-06-23 12:04:05 -04:00
Tobias McNulty
17e661641d
Refs #26666 -- Added ALLOWED_HOSTS validation when running tests.
...
Also used ALLOWED_HOSTS to check for external hosts in assertRedirects().
2016-06-20 11:07:46 -04:00
Ville Skyttä
96f97691ad
Fixed broken links in docs and comments.
2016-06-15 21:20:23 -04:00
Simon Charette
b484f167be
Fixed #26712 -- Avoided unnecessary SET TIMEZONE queries on PostgreSQL.
...
A change of the USE_TZ or TIME_ZONE settings doesn't necessarily require a
change to the active connections' timezones.
2016-06-06 11:26:02 -04:00
Tobias McNulty
78a0ca67f6
Refs #26666 -- Fixed test failures caused by assertRedirects changes ( #6701 )
2016-06-02 21:47:30 -07:00
Tobias McNulty
c7b1b81352
Fixed #26666 -- Added more useful error message to assertRedirects
2016-06-02 14:43:31 -07:00
Simon Charette
7694e196ce
Moved the AUTH_USER_MODEL setting changed receiver.
...
Test suites besides Django's may need the same behavior.
2016-05-18 09:56:29 -04:00
Florian Apolloner
9baf692a58
Fixed #26601 -- Improved middleware per DEP 0005.
...
Thanks Tim Graham for polishing the patch, updating the tests, and
writing documentation. Thanks Carl Meyer for shepherding the DEP.
2016-05-17 07:22:22 -04:00
Simon Charette
ad0f536e1c
Fixed #26577 -- Disabled implicit wait of Selenium tests where appropriate.
2016-05-03 23:19:24 -04:00
Vasiliy Faronov
ac77c55bc5
Fixed #26567 -- Updated references to obsolete RFC2616.
...
Didn't touch comments where it wasn't obvious that the code adhered to
the newer standard.
2016-05-03 11:14:40 -04:00
Tim Graham
2f698cd991
Refs #26428 -- Added support for relative path redirects to the test client.
...
Thanks iktyrrell for the patch.
2016-04-29 09:15:28 -04:00
Tim Graham
bb0b4b705b
Fixed #26052 -- Moved conditional_content_removal() processing to the test client.
2016-04-25 07:56:07 -04:00
Tim Graham
df8d8d4292
Fixed E128 flake8 warnings in django/.
2016-04-08 09:51:06 -04:00
Tim Graham
2cd2d18851
Fixed W503 flake8 warnings.
2016-04-04 17:14:26 -04:00
Sergey Kolosov
21dd98a386
Fixed #25699 -- Allowed using the test client if 'django.contrib.sessions' isn't in INSTALLED_APPS.
2016-04-04 07:48:48 -04:00
Tim Graham
d2569f89f2
Fixed #26428 -- Added support for relative path redirects in assertRedirects().
...
Thanks Trac alias master for the report and review.
2016-04-02 10:35:33 -04:00
Alexander Gaevsky
107165c4b0
Fixed #24987 -- Allowed inactive users to login with the test client.
2016-03-23 09:01:52 -04:00
Akshesh
44c0ecdd92
Fixed #25364 -- Added generic way to test on all browsers supported by selenium.
...
Browser names should be passed as a comma separated list to the --selenium flag.
Thanks Tim Graham, Simon Charette and Moritz Sichert for review and discussion.
2016-03-15 13:10:32 -04:00
Markus Holtermann
1cb65b8a77
Fixed #26157 #25321 -- Added sql/params to extra context of schema logger
...
Thanks Akshesh Doshi for the initial patch and Tim Graham for the review
2016-03-15 17:45:58 +11:00
Tim Graham
032f5a7896
Refs #25735 -- Made @tag decorator importable from django.test.
2016-02-19 14:21:00 -05:00
Jakub Paczkowski
d4dc775620
Fixed #25735 -- Added support for test tags to DiscoverRunner.
...
Thanks Carl Meyer, Claude Paroz, and Simon Charette for review.
2016-02-17 09:44:18 -05:00
Jon Dufresne
fcd08c1757
Fixed #11665 -- Made TestCase check deferrable constraints after each test.
2016-02-13 06:53:39 -05:00
Tim Graham
97eb3356b2
Fixed #26177 -- Fixed a PostgreSQL crash with TIME_ZONE=None and USE_TZ=False.
2016-02-08 07:21:54 -05:00
knbk
e000ca23d2
Removed obsolete comment.
2016-02-08 00:11:22 -05:00
userimack
60586dd737
Fixed #26125 -- Fixed E731 flake warnings.
2016-01-25 14:23:43 -05:00
Simon Charette
56c461a0d7
Fixed #26038 -- Changed FileSystemStorage defaults on setting change.
...
Thanks to Dave Voutila for the report and Tim for the review.
2016-01-07 12:04:39 -05:00
Paulo Poiati
b643386668
Fixed #24855 -- Allowed using contrib.auth.login() without credentials.
...
Added an optional `backend` argument to login().
2016-01-07 08:56:07 -05:00
Simon Charette
4ccf7154c3
Unified test context decorators.
...
Thanks to Tim for the review.
2016-01-06 20:00:07 -05:00
Simon Charette
7bb373e309
Refs #25746 -- Added a test utility to isolate inlined model registration.
...
Thanks to Tim for the review.
2016-01-06 20:00:07 -05:00
Benjamin Bach
8ad18103a1
Replaced dict.setdefault() usage to avoid unnecessary object instantiations.
2016-01-05 13:06:23 -05:00
Marten Kenbeek
16411b8400
Fixed #26013 -- Moved django.core.urlresolvers to django.urls.
...
Thanks to Tim Graham for the review.
2015-12-31 14:21:29 -05:00