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
d88ec42bd0
Used addCleanup() in tests where appropriate.
2023-12-31 10:01:31 +01:00
Clément Escolano
cac94dd8aa
Fixed #33651 -- Added support for prefetching GenericForeignKey.
...
Co-authored-by: revanthgss <revanthgss@almabase.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-09-18 13:23:21 +02:00
Hrushikesh Vaidya
a52bdea5a2
Fixed #33985 -- Used app_config.verbose_name in ContentType.__str__().
2023-03-09 10:27:08 +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
Bhuvnesh
123b1d3fcf
Fixed #34137 -- Made Model.refresh_from_db() clear cached generic relations.
...
Thanks Simon Charette for the implementation idea.
2022-11-07 08:06:30 +01:00
Marcelo Galigniana
f30c7e381c
Completed test coverage for contenttypes models.
2022-10-11 05:38:39 +02:00
Sarah Boyce
84206607d6
Fixed #32833 -- Fixed ContentTypeManager.get_for_models() crash when using in migrations.
...
Co-authored-by: Heraldo Lucena <23155511+HMaker@users.noreply.github.com>
2022-10-10 08:57:52 +02:00
Mariusz Felisiak
8e89dfe1c2
Fixed various tests on MySQL with MyISAM storage engine.
2022-04-18 07:05:52 +02:00
David Smith
3b3f38b3b0
Fixed #31169 -- Adapted the parallel test runner to use spawn.
...
Co-authored-by: Valz <ahmadahussein0@gmail.com>
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2022-03-15 16:23:55 +01:00
Biel Frontera
859a87d873
Fixed #31357 -- Fixed get_for_models() crash for stale content types when model with the same name exists in another app.
2022-03-14 12:52:26 +01:00
Hameed Gifford
58d357fc65
Fixed #33563 -- Fixed contenttype reverse data migration crash with a multiple databases setup.
2022-03-08 06:22:03 +01:00
Mariusz Felisiak
7119f40c98
Refs #33476 -- Refactored code to strictly match 88 characters line length.
2022-02-07 20:37:05 +01:00
django-bot
9c19aff7c7
Refs #33476 -- Reformatted code with Black.
2022-02-07 20:37:05 +01:00
Martin Svoboda
cc4cb95bef
Fixed #33008 -- Fixed prefetch_related() for deleted GenericForeignKeys.
...
Thanks Simon Charette for the implementation idea.
2021-10-14 12:37:03 +02:00
Tom Carrick
bcc2befd0e
Fixed #31789 -- Added a new headers interface to HttpResponse.
2020-09-14 08:41:59 +02:00
Simon Charette
94f63b926f
Refs #31395 -- Relied on setUpTestData() test data isolation in various tests.
2020-05-15 20:22:56 +02:00
Mariusz Felisiak
555e3a848e
Removed unused __str__() methods in tests models.
...
Follow up to 6461583b6c
.
2020-04-30 09:13:23 +02:00
gowthamk63
142ab6846a
Fixed #31123 -- Added --include-stale-apps option to the remove_stale_contenttypes management command.
...
Co-Authored-By: Javier Buzzi <buzzi.javier@gmail.com>
2020-03-19 11:48:10 +01:00
Hasan Ramezani
661e6cc2c9
Fixed #29706 -- Made RenameContentType._rename() save to the correct database.
2019-06-06 12:09:01 +02:00
Gregory N. Schmit
48c17807a9
Fixed #16027 -- Added app_label to ContentType.__str__().
2019-02-07 19:56:47 -05:00
Simon Charette
8c775391b7
Refs #28478 -- Deprecated TestCase's allow_database_queries and multi_db in favor of databases.
2019-01-10 19:11:21 -05:00
Tim Graham
043bd70942
Updated test URL patterns to use path() and re_path().
2018-12-31 10:47:32 -05:00
Tim Graham
194a4b526c
Added tests for ContentType/Group/Permission.__str__().
2018-12-21 12:45:02 -05:00
Jon Dufresne
08ebed5e79
Fixed #29556 -- Made 'remove_stale_contenttypes --noinput' delete content types.
2018-07-10 10:14:34 -04:00
Tim Graham
178624855a
Simplified a couple test docstrings.
2018-07-10 09:43:12 -04:00
Paulo
fa679db1ff
Refs #18620 -- Refactored ContentTypes view tests to group related field test cases.
2018-06-21 12:31:04 -04:00
Paulo
d14850e525
Fixed #18620 -- Made ContentTypes shortcut view prefer current site if available.
...
Thanks Mike Tigas (mtigas) for the initial patch.
2018-06-21 12:31:04 -04:00
Paulo
efbcd60a22
Added test for contenttype redirect with m2m objects.
...
Thanks carltongibson for the test logic.
2018-06-21 12:31:00 -04:00
Tim Graham
b49ed4be47
Corrected location of some contenttypes_tests.
2018-06-21 12:26:28 -04:00
Tim Graham
d0a42a14c0
Fixed imports per isort 4.3.1.
...
Partially reverted 9bcf73d788
.
2018-02-02 14:44:07 -05:00
Mariusz Felisiak
9bcf73d788
Fixed imports per isort 4.3.0.
2018-02-01 09:29:46 +01:00
michaldabski
d381914aef
Fixed #28313 -- Added model name max length check of 100 characters in contrib.contentttypes.
2017-06-26 18:12:35 -04:00
Pavel Rybintsev
874b1f2cac
Fixed #26936 -- Fixed stale ContentType deletion in apps without models.
2017-06-16 09:22:47 -04:00
Bruno Alla
6092ea8fa6
Refs #27804 -- Used subTest() in several tests.
2017-05-24 08:36:34 -04:00
Tim Graham
ab83d4d8fe
Added multi_db=True to test cases that access the 'other' db connection.
...
Fixed a failure in the context processors tests when running in
reverse on MySQL due to an extra query after refs #27683 .
2017-02-10 08:19:32 -05:00
Anton Samarchyan
4d6584000a
Refs #27745 -- Improved test coverage of contrib.contenttypes.
2017-02-03 14:17:00 -05:00
Tim Graham
aa14528910
Split up contenttypes_tests.
2017-02-03 13:58:59 -05:00
Tim Graham
29f607927f
Fixed spelling of "nonexistent".
2017-02-03 08:01:45 -05:00
Claude Paroz
fee42fd99e
Refs #23919 -- Replaced usage of django.utils.http utilities with Python equivalents
...
Thanks Tim Graham for the review.
2017-01-26 19:49:03 +01:00
Claude Paroz
2366100872
Removed unneeded force_text calls in the test suite
2017-01-24 18:45:54 +01:00
Tim Graham
7aba69145d
Refs #23919 -- Removed django.test.mock Python 2 compatibility shim.
2017-01-20 08:17:20 -05:00
Claude Paroz
dc8834cad4
Refs #23919 -- Removed unneeded force_str calls
2017-01-20 08:44:31 +01:00
Simon Charette
cecc079168
Refs #23919 -- Stopped inheriting from object to define new style classes.
2017-01-19 08:39:46 +01: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
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
Simon Charette
4e48cfc108
Fixed #27709 -- Fixed get_for_models() for proxies with an empty cache.
...
Thanks Peter Inglesby for the report and tests.
2017-01-13 10:02:01 -05:00
Simon Charette
dc1193085d
Made contenttypes and auth apps unavailable when not necessary in tests.
2017-01-13 08:50:03 -05:00