1
0
mirror of https://github.com/django/django.git synced 2025-03-14 11:20:46 +00:00

984 Commits

Author SHA1 Message Date
Adam Johnson
9582745257 Fixed #35622 -- Made unittest ignore Django assertions in traceback frames.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-08-08 21:34:01 -03:00
Jacob Walls
1029a4694e Fixed typo in django/test/testcases.py docstring. 2024-07-22 08:36:13 +02:00
Jake Howard
ff308a0604
Fixed 35467 -- Replaced urlparse with urlsplit where appropriate.
This work should not generate any change of functionality, and
`urlsplit` is approximately 6x faster.

Most use cases of `urlparse` didn't touch the path, so they can be
converted to `urlsplit` without any issue. Most of those which do use
`.path`, simply parse the URL, mutate the querystring, then put them
back together, which is also fine (so long as urlunsplit is used).
2024-05-29 10:48:27 -03:00
Nick Pope
ceaf1e2848 Fixed SeleniumTestCase.set_emulated_media() when using selenium_hub.
The .execute_cdp_cmd() method doesn't exist on selenium.webdriver.Remote.
2024-05-13 17:31:35 +02:00
Nick Pope
53b981eff2 Added support for using Microsoft Edge with Selenium. 2024-05-13 17:31:35 +02:00
Nick Pope
962215db13 Organized images in the screenshots workflow.
Added a top-level directory in the zip archive that is the commit
hash which makes it easier when downloading multiple artifacts
for comparison. Updated the filenames of screenshots for easier
comparison between different cases. Added that an error is
raised if no screenshots uploaded in workflow.
2024-05-10 10:37:56 +02:00
Natalia
3614ce2b7c Refs #31224 -- Fixed typo in django/test/client.py. 2024-05-03 22:45:15 -03:00
Sarah Boyce
39828fa778 Added a high contrast mode to screenshot cases.
Thank you to Sarah Abderemane and Nick Pope for the reviews.
2024-05-02 13:18:58 +02:00
Jon Janzen
f5c340684b Fixed #34901 -- Added async-compatible interface to session engines.
Thanks Andrew-Chen-Wang for the initial implementation which was posted
to the Django forum thread about asyncifying contrib modules.
2024-03-13 17:55:15 +01:00
Adam Johnson
0a560eab55
Moved --failfast to DiscoverRunner. 2024-03-09 20:34:00 +01:00
David Wobrock
ef2434f850
Refs #32114 -- Fixed test crash on non-picklable objects in subtests when PickleError is raised.
Related to the https://github.com/python/cpython/issues/73373.

Follow up to c09e8f5fd8f977bf16e9ec5d11b370151fc81ea8.
2024-02-26 17:18:48 +01:00
David Wobrock
c09e8f5fd8 Fixed #32114 -- Fixed parallel test crash on non-picklable objects in subtests. 2024-02-21 12:04:03 +01:00
Mariusz Felisiak
5f637a8a8d
Fixed #35226 -- Reallowed executing queries for dynamically created connections.
Regression in 8fb0be3500cc7519a56985b1b6f415d75ac6fedb.

Thanks Florian Apolloner for the report.
2024-02-19 18:34:18 +01:00
Tim Graham
bf692b2fdc
Fixed #28263 -- Fixed TestCase setup for databases that don't support savepoints. 2024-02-14 07:57:38 +01:00
Mariusz Felisiak
305757aec1
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
2024-01-26 12:45:07 +01:00
Mariusz Felisiak
0c5456ef37
Used enterClassContext() where appropriate. 2024-01-04 05:55:29 +01:00
David Wobrock
8fb0be3500 Fixed #33277 -- Disallowed database connections in threads in SimpleTestCase. 2024-01-03 13:02:26 +01:00
Nicolas Lupien
2bf46c3825 Fixed #34658 -- Added SimpleTestCase.assertNotInHTML(). 2023-12-22 08:27:59 +01:00
Nick Pope
ed4f83782d Refs #34305 -- Added SimpleTestCase.enterClassContext() on Python < 3.11. 2023-12-12 09:15:14 +01:00
Nick Pope
fb9216382a Refs #34986 -- Moved garbage_collect() helper to django.test.utils. 2023-12-06 09:26:11 +01:00
Nick Pope
5e28cd3f2c
Fixed #34983 -- Deprecated django.utils.itercompat.is_iterable(). 2023-11-24 12:06:29 +01:00
Tom Carrick
a03593967f Fixed #14611 -- Added query_params argument to RequestFactory and Client classes. 2023-11-23 10:39:29 +01:00
Ben Cail
523fed1d2f Fixed #32106 -- Preserved HTTP_HOST in test Client when following redirects.
Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
2023-10-31 05:29:43 +01:00
David Sanders
68d0159b6d
Fixed #34903, Refs #34825 -- Made workers initialization respect empty set of used connections.
Thanks to David Smith for the investigation & patch.

Regression in 2128a73713735fb794ca6565fd5d7792293f5cfa.
Follow up to a5905b164dbf52e59fa646af9c3d523c0804d86a.

Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
2023-10-23 05:41:34 +02:00
Sarah Boyce
be56c982c0 Refs #34043 -- Added --screenshots option to runtests.py and selenium tests. 2023-10-18 06:14:40 +02:00
Sarah Boyce
f6629ee2c9 Refs #34043 -- Added context managers to SeleniumTestCase for changing window size. 2023-10-16 10:36:26 +02:00
Chinmoy Chakraborty
1dae65dc63 Fixed #34657 -- Made assert(Not)Contains/assertInHTML display haystacks in error messages. 2023-10-03 10:44:36 +02:00
Mariusz Felisiak
679212a47a
Refs #34657 -- Made msg_prefix handling in assertURLEqual()/assertInHTML consistent with other assertions.
Co-authored-by: Chinmoy Chakraborty <chinmoy12c@gmail.com>
2023-10-03 09:25:48 +02:00
faishalmanzar
f4e72e6523 Fixed #32602 -- Clarified wording of TestCase class. 2023-10-02 09:12:08 +02:00
Chinmoy Chakraborty
e99c7d8847 Refs #34657 -- Made assertInHTML() use unparsed needle in error messages. 2023-09-29 09:52:39 +02:00
Mariusz Felisiak
6ad0dbc8d9
Refs #15667 -- Added resetting default renderer when FORM_RENDERER is changed. 2023-09-29 08:54:13 +02:00
David Sanders
a5905b164d Fixed #34825 -- Avoided setting unused connections when initializing parallel workers. 2023-09-25 10:14:55 +02:00
Arian
51d703a27f Fixed #34823 -- Fixed assertTemplateUsed() context manager crash on unnamed templates. 2023-09-22 10:51:10 +02:00
Mariusz Felisiak
f72f420f17 Refs #26029 -- Removed DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings.
This also removes django.core.files.storage.get_storage_class().

Per deprecation timeline.
2023-09-18 22:12:40 +02:00
Mariusz Felisiak
69af3bea99 Refs #33990 -- Removed TransactionTestCase.assertQuerysetEqual() per deprecation timeline. 2023-09-18 22:12:40 +02:00
Mariusz Felisiak
c35fd9e275 Refs #33990 -- Removed SimpleTestCase.assertFormsetError() per deprecation timeline. 2023-09-18 22:12:40 +02:00
David Smith
74b5074174 Fixed #34210 -- Added unittest's durations option to the test runner. 2023-08-31 07:14:58 +02:00
Olivier Tabone
3f8dbe267d Fixed #34757 -- Added support for following redirects to AsyncClient. 2023-08-30 06:12:25 +02:00
Mariusz Felisiak
95b8449158
Corrected AsyncRequestFactory's docstring.
All AsyncRequestFactory methods are still synchronous callables.
2023-08-24 10:31:52 +02:00
Olivier Tabone
a9e0f3d301 Refs #34757 -- Moved HTTP redirect logic to django.test.client.ClientMixin. 2023-08-23 07:19:48 +02:00
Nick Pope
89c8c2e831 Simplified call_command() calls. 2023-07-27 15:48:47 +02:00
Bruno Alla
a564f44350 Fixed typo in django/test/utils.py. 2023-07-27 06:56:38 +02:00
David Smith
1d0dfc0b92 Refs #30686 -- Moved Parser.SELF_CLOSING_TAGS to django.utils.html.VOID_ELEMENTS 2023-07-14 10:25:00 +02:00
Jon Janzen
5e98959d92 Fixed #34391 -- Added async-compatible interface to auth functions and related methods test clients. 2023-06-27 11:17:17 +02:00
Jonathan Weth
ecd5a0daaf
Fixed #34675 -- Fixed creating remote webdriver for Selenium 4.10.0+. 2023-06-26 14:33:28 +02:00
Sarah Boyce
d6e9ec4014
Refs #27079 -- Used addClassCleanup() in SeleniumTestCase.
Regression in def09bf4126d4886413adf7388882eca8e32576b.
2023-06-19 20:15:37 +02:00
anthony kugel
68d0f95262 Fixed #34649 -- Fixed headless deprecation warning on Selenium 4.8+.
Thanks David Smith for the report and initial patch.
2023-06-13 13:09:12 +02:00
Jon Janzen
e83a88566a Fixed #32172 -- Adapted signals to allow async handlers.
co-authored-by: kozzztik <kozzztik@mail.ru>
co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2023-03-07 08:39:25 +01:00
Alexandre Spaeth
52b054824e Fixed #34342, Refs #33735 -- Fixed test client handling of async streaming responses.
Bug in 0bd2c0c9015b53c41394a1c0989afbfd94dc2830.

Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2023-02-17 10:48:04 +01:00
David Smith
097e3a70c1 Refs #33476 -- Applied Black's 2023 stable style.
Black 23.1.0 is released which, as the first release of the year,
introduces the 2023 stable style. This incorporates most of last year's
preview style.

https://github.com/psf/black/releases/tag/23.1.0
2023-02-01 11:04:38 +01:00