Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Reverting [16376] in preparation for reverting [16356]. See #16182.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16425 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 222a5ed69e174e6b7b123c1101744e18aa372a4a 1 parent fffe983
Andrew Godwin authored June 17, 2011
11  django/contrib/formtools/wizard/tests/cookiestoragetests.py
@@ -25,7 +25,6 @@ def test_manipulated_cookie(self):
25 25
         self.assertRaises(SuspiciousOperation, storage.load_data)
26 26
 
27 27
     def test_reset_cookie(self):
28  
-        from django.core.signing import SignatureExpired
29 28
         request = get_request()
30 29
         storage = self.get_storage()('wizard1', request, None)
31 30
 
@@ -36,15 +35,7 @@ def test_reset_cookie(self):
36 35
 
37 36
         cookie_signer = signing.get_cookie_signer(storage.prefix)
38 37
         signed_cookie_data = cookie_signer.sign(storage.encoder.encode(storage.data))
39  
-
40  
-        # signing with different timestamps generates different signatures
41  
-        self.assertNotEqual(response.cookies[storage.prefix].value, signed_cookie_data)
42  
-        self.assertEqual(cookie_signer.unsign(response.cookies[storage.prefix].value),
43  
-                         cookie_signer.unsign(signed_cookie_data))
44  
-        self.assertRaises(SignatureExpired,
45  
-                          lambda: cookie_signer.unsign(value=response.cookies[storage.prefix].value, max_age=0))
46  
-        self.assertEqual(cookie_signer.unsign(value=response.cookies[storage.prefix].value, max_age=10),
47  
-                         cookie_signer.unsign(signed_cookie_data))
  38
+        self.assertEqual(response.cookies[storage.prefix].value, signed_cookie_data)
48 39
 
49 40
         storage.init_data()
50 41
         storage.update_response(response)

0 notes on commit 222a5ed

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