예제 #1
0
파일: test.py 프로젝트: magopian/receipts
 def test_sig(self):
     res = certs.parse_jwt(jwt.encode(self.jwk, 'key'))
     self.failUnlessRaises(ValueError, res.check_signature,
         {'alg': 'HS256', 'exp': 'AQAB', 'mod': 'AQAB'})
예제 #2
0
파일: test.py 프로젝트: magopian/receipts
 def test_not_sig(self):
     res = certs.parse_jwt(jwt.encode(self.jwk, 'key'))
     ok_(not res.check_signature(self.jwk['jwk'][0]))
예제 #3
0
파일: test.py 프로젝트: magopian/receipts
 def test_parse(self):
     res = certs.parse_jwt(jwt.encode(self.jwk, 'key'))
     ok_(isinstance(res, certs.ReceiptJWT))
예제 #4
0
파일: test.py 프로젝트: andymckay/receipts
 def test_sig(self):
     res = certs.parse_jwt(jwt.encode(self.jwk, "key"))
     self.failUnlessRaises(ValueError, res.check_signature, {"alg": "HS256", "exp": "AQAB", "mod": "AQAB"})
예제 #5
0
파일: test.py 프로젝트: andymckay/receipts
 def test_not_sig(self):
     res = certs.parse_jwt(jwt.encode(self.jwk, "key"))
     ok_(not res.check_signature(self.jwk["jwk"][0]))
예제 #6
0
파일: test.py 프로젝트: andymckay/receipts
 def test_parse(self):
     res = certs.parse_jwt(jwt.encode(self.jwk, "key"))
     ok_(isinstance(res, certs.ReceiptJWT))