0
0
mirror of https://github.com/django/django.git synced 2024-11-27 17:16:33 +01:00
Commit Graph

55 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
Mariusz Felisiak
0c5456ef37
Used enterClassContext() where appropriate. 2024-01-04 05:55:29 +01:00
Mariusz Felisiak
d88ec42bd0
Used addCleanup() in tests where appropriate. 2023-12-31 10:01:31 +01:00
nessita
1b56b24f81
Fixed #34958 -- Fixed isolation of messages_tests.tests.TestLevelTags.test_lazy. 2023-11-13 09:35:57 +01:00
Mariusz Felisiak
311718feb5 Fixed #34923 -- Avoided initializing LEVEL_TAGS when importing django.contrib.messages.
Regression in b7fe36ad37.

Thanks James Gillard for the report.
2023-10-24 14:09:31 -03:00
François Freitag
cafe7266ee Fixed #34730 -- Added django.contrib.messages.test.MessagesTestMixin.assertMessages(). 2023-09-05 11:55:37 +02:00
François Freitag
b7fe36ad37 Refs #34730 -- Made Message importable from django.contrib.messages. 2023-08-25 06:55:12 +02:00
François Freitag
7bba231b67 Refs #24121 -- Added __repr__() to Message. 2023-08-24 11:06:13 +02:00
David Wobrock
21757bbdcd Refs #28948 -- Removed superfluous messages from cookie through bisect. 2023-03-27 09:22:00 +02:00
David Wobrock
9d0c878abf Refs #28948 -- Precomputed once serialized cookie messages.
When the cookie size is too long, the same messages were serialized
over and over again.
2023-03-27 09:14:54 +02:00
David Wobrock
67208a5ad6 Fixed typo in tests/messages_tests/test_cookie.py. 2023-03-27 08:55:48 +02: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
Timothy McCurrach
efb4478e48 Fixed #33458 -- Fixed encoding of messages with empty string as extra_tags. 2022-01-24 07:05:53 +01:00
Hasan Ramezani
24b316536a Fixed #33303 -- Changed messages' level tags on MESSAGE_TAGS setting change. 2021-11-26 07:09:31 +01:00
Mariusz Felisiak
737fa72ae3 Refs #32191 -- Removed for the pre-Django 3.2 format of messages in CookieStorage.
Per deprecation timeline.
2021-09-20 21:23:01 +02:00
Carlton Gibson
3a45fea083 Fixed #21936 -- Allowed DeleteView to work with custom Forms and SuccessMessageMixin.
Thanks to Mariusz Felisiak for review.

Co-authored-by: Demetris Stavrou <demestav@gmail.com>
Co-authored-by: Caroline Simpson <github@hoojiboo.com>
2021-07-14 09:47:03 +02:00
saeedblanchette
7dd502b0e1 Refs #24121 -- Added __repr__() to ChangeList and BaseStorage. 2021-06-07 06:31:50 +02:00
Florian Apolloner
4511d14598 Fixed #32643 -- Fixed decoding of messages in the pre-Django 3.2 format.
Thanks Jan Pieter Waagmeester for the report.

Regression in 2d6179c819.
2021-04-14 22:52:59 +02:00
Daniyal
54d9179540 Refs #32508 -- Raised ImproperlyConfigured instead of using "assert" in SessionStorage. 2021-03-16 09:01:49 +01:00
Mariusz Felisiak
0aa6a602b2 Refs #31842 -- Removed DEFAULT_HASHING_ALGORITHM transitional setting.
Per deprecation timeline.
2021-01-14 17:50:04 +01:00
Mariusz Felisiak
831a05b185 Refs #27604 -- Removed support for the pre-Django 3.1 encoding format in CookieStorage.
Per deprecation timeline.
2021-01-14 17:50:04 +01:00
Florian Apolloner
2d6179c819 Fixed #32191 -- Made CookieStorage use RFC 6265 compliant format.
Co-authored-by: Craig Smith <hello@craigiansmith.com.au>
2021-01-07 13:00:53 +01:00
Florian Apolloner
d10425f9c7 Simplified MessageEncoder instantiation with default separators. 2020-11-20 10:27:09 +01:00
Mariusz Felisiak
d907371ef9 Fixed #31842 -- Added DEFAULT_HASHING_ALGORITHM transitional setting.
It's a transitional setting helpful in migrating multiple instance of
the same project to Django 3.1+.

Thanks Markus Holtermann for the report and review, Florian
Apolloner for the implementation idea and review, and Carlton Gibson
for the review.
2020-08-04 09:35:24 +02:00
Mariusz Felisiak
240cbb63bf
Fixed #31790 -- Fixed setting SameSite and Secure cookies flags in HttpResponse.delete_cookie().
Cookies with the "SameSite" flag set to None and without the "secure"
flag will be soon rejected by latest browser versions.

This affects sessions and messages cookies.
2020-07-16 08:16:58 +02:00
Claude Paroz
4d973f5939 Refs #26601 -- Deprecated passing None as get_response arg to middleware classes.
This is the new contract since middleware refactoring in Django 1.10.

Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-02-18 20:03:44 +01:00
Claude Paroz
8ae84156d6 Fixed #27604 -- Used the cookie signer to sign message cookies.
Co-authored-by: Craig Anderson <craiga@craiga.id.au>
2020-02-04 08:05:02 +01:00
Claude Paroz
e7d62e97eb
Refs #22426 -- Removed pre-Django 1.5 messages compatibility code and test.
This reverts commit f286721f7f.
2020-01-31 11:11:24 +01:00
Sergey Fedoseev
d4e767911f Added tests for middlewares' checks. 2019-10-23 08:18:02 +02:00
ElizabethU
54ea290e5b Fixed #30651 -- Made __eq__() methods return NotImplemented for not implemented comparisons.
Changed __eq__ to return NotImplemented instead of False if compared to
an object of the same type, as is recommended by the Python data model
reference. Now these models can be compared to ANY (or other objects
with __eq__ overwritten) without returning False automatically.
2019-10-01 17:58:19 +02:00
Mariusz Felisiak
0d4b40fe66 Refs #30651 -- Added tests for Message.__eq__(). 2019-10-01 17:35:55 +02:00
Tim Graham
043bd70942 Updated test URL patterns to use path() and re_path(). 2018-12-31 10:47:32 -05:00
Simon Charette
0f212db29d Made reused RequestFactory instances class attributes. 2018-11-27 09:49:02 -05:00
Alex Gaynor
9a56b4b13e Fixed #27863 -- Added support for the SameSite cookie flag.
Thanks Alex Gaynor for contributing to the patch.
2018-04-13 20:58:31 -04:00
Mariusz Felisiak
9bcf73d788 Fixed imports per isort 4.3.0. 2018-02-01 09:29:46 +01:00
Дилян Палаузов
a38ae914d8 Fixed #28996 -- Simplified some boolean constructs and removed trivial continue statements. 2018-01-12 12:44:50 -05:00
Alexey
0afffae4ec Fixed #28965 -- Updated Set-Cookie's Expires date format to follow RFC 7231. 2018-01-02 11:22:59 -05:00
Nick Pope
81abece192 Corrected type of MESSAGE_TAGS setting override in tests. 2017-12-08 13:18:31 -05:00
Jon Dufresne
21046e7773 Fixed #28249 -- Removed unnecessary dict.keys() calls.
iter(dict) is equivalent to iter(dict.keys()).
2017-05-27 19:08:46 -04:00
Claude Paroz
d1e5516c06 Complemented message storage test with explicit None extra_tags value 2017-05-10 22:38:46 +02:00
Asif Saifuddin Auvi
5f3a689f71 Imported django.http classes instead of django.http. 2017-02-27 14:47:11 -05:00
Claude Paroz
c651331b34 Converted usage of ugettext* functions to their gettext* aliases
Thanks Tim Graham for the review.
2017-02-07 09:04:04 +01:00
chillaranand
d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Simon Charette
cecc079168 Refs #23919 -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
Raffaele Salmaso
ed8c0c941d Fixed #27688 -- Made messages' add_message() request check use ducktyping. 2017-01-09 18:03:10 -05:00
Tim Graham
0793182694 Cosmetic edits for messages_tests. 2017-01-05 09:31:23 -05:00
za
321e94fa41 Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
Jon Dufresne
4f336f6652 Fixed #26747 -- Used more specific assertions in the Django test suite. 2016-06-16 14:19:18 -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