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:
Carl Meyer 2011-12-16 23:50:34 +00:00
parent 3f003a3c4b
commit 1b312edbeb
1 changed files with 4 additions and 2 deletions

View File

@ -426,5 +426,7 @@ class RequestsTests(unittest.TestCase):
warnings_state = get_warnings_state()
warnings.filterwarnings('ignore', category=DeprecationWarning, module='django.http')
try:
self.assertEqual(request.body, request.raw_post_data)
finally:
restore_warnings_state(warnings_state)