mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #18042 -- Advanced deprecation warnings.
Thanks Ramiro for the patch.
This commit is contained in:
@@ -420,5 +420,10 @@ class RequestsTests(unittest.TestCase):
|
||||
'CONTENT_LENGTH': len(payload),
|
||||
'wsgi.input': ExplodingStringIO(payload)})
|
||||
|
||||
with self.assertRaises(UnreadablePostError):
|
||||
request.raw_post_data
|
||||
warnings_state = get_warnings_state()
|
||||
warnings.filterwarnings('ignore', category=DeprecationWarning, module='django.http')
|
||||
try:
|
||||
with self.assertRaises(UnreadablePostError):
|
||||
request.raw_post_data
|
||||
finally:
|
||||
restore_warnings_state(warnings_state)
|
||||
|
||||
Reference in New Issue
Block a user