Refs #17323 -- Updated a test to use try/finally to avoid state leakage. Thanks dstufft for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
3f003a3c4b
commit
1b312edbeb
|
@ -426,5 +426,7 @@ class RequestsTests(unittest.TestCase):
|
||||||
|
|
||||||
warnings_state = get_warnings_state()
|
warnings_state = get_warnings_state()
|
||||||
warnings.filterwarnings('ignore', category=DeprecationWarning, module='django.http')
|
warnings.filterwarnings('ignore', category=DeprecationWarning, module='django.http')
|
||||||
self.assertEqual(request.body, request.raw_post_data)
|
try:
|
||||||
restore_warnings_state(warnings_state)
|
self.assertEqual(request.body, request.raw_post_data)
|
||||||
|
finally:
|
||||||
|
restore_warnings_state(warnings_state)
|
||||||
|
|
Loading…
Reference in New Issue