1
0
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:
Aymeric Augustin
2012-05-03 15:27:01 +02:00
parent 227cec686e
commit e84f79f051
27 changed files with 75 additions and 38 deletions

View File

@@ -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)