Skip to content

Commit

Permalink
Fix assertRaises syntax for 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Brauer committed May 30, 2013
1 parent 753a814 commit 674b7b4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests.py
Expand Up @@ -248,9 +248,8 @@ def test_token_expires_at_given_expiry_time(self):
self.assertRaises(idmod.SignatureExpired, s.loads, result)

def test_token_is_invalid_if_expiry_time_is_missing(self):
t = self.serializer_class("secret")
with self.assertRaises(idmod.BadSignature):
t.loads(self.invalid_token_empty)
s = self.serializer_class("secret")
self.assertRaises(idmod.BadSignature, s.loads, self.invalid_token_empty)

def test_token_is_invalid_if_expiry_time_is_of_wrong_type(self):
s = self.serializer_class("secret")
Expand Down

0 comments on commit 674b7b4

Please sign in to comment.