Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Refs #17323 -- Updated a test to use try/finally to avoid state leaka…

…ge. Thanks dstufft for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1b312edbeb469c58d8518cc0ece9cdb6c37f5c7e 1 parent 3f003a3
Carl Meyer authored December 16, 2011

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  tests/regressiontests/requests/tests.py
6  tests/regressiontests/requests/tests.py
@@ -426,5 +426,7 @@ def test_raw_post_data_returns_body(self):
426 426
 
427 427
         warnings_state = get_warnings_state()
428 428
         warnings.filterwarnings('ignore', category=DeprecationWarning, module='django.http')
429  
-        self.assertEqual(request.body, request.raw_post_data)
430  
-        restore_warnings_state(warnings_state)
  429
+        try:
  430
+            self.assertEqual(request.body, request.raw_post_data)
  431
+        finally:
  432
+            restore_warnings_state(warnings_state)

0 notes on commit 1b312ed

Please sign in to comment.
Something went wrong with that request. Please try again.