def missing_expiry(alg, key):
@Vows.batch<EOL>class GenerateJWTWithoutExpiry(Vows.Context):<EOL><INDENT>"""<STR_LIT>"""<EOL>def topic(self):<EOL><INDENT>"""<STR_LIT>"""<EOL>return jwt.generate_jwt(payload, key, alg)<EOL><DEDENT>class Verify(Vows.Context):<EOL><INDENT>"""<STR_LIT>"""<EOL>@Vows.capture_error<EOL>def topic(self, topic):<EOL><INDENT>"""<STR_LIT>"""<EOL>return jwt.verify_jwt(topic, key, [alg])<EOL><DEDENT>def token_should_not_verify(self, r):<EOL><INDENT>"""<STR_LIT>"""<EOL>expect(r).to_be_an_error()<EOL>expect(str(r)).to_equal('<STR_LIT>')<EOL><DEDENT><DEDENT>class VerifyChecksOptional(Vows.Context):<EOL><INDENT>"""<STR_LIT>"""<EOL>@Vows.capture_error<EOL>def topic(self, topic):<EOL><INDENT>"""<STR_LIT>"""<EOL>return jwt.verify_jwt(topic, key, [alg], checks_optional=True)<EOL><DEDENT>def token_should_verify(self, r):<EOL><INDENT>"""<STR_LIT>"""<EOL>expect(r).to_be_instance_of(tuple)<EOL><DEDENT><DEDENT><DEDENT>
setup tests