def test_good(self): # TODO: when getting and storing the secret is stored out, # this test will need fixing. jwt = get_client().create_jwt(id="blarg", secret="some-unknown", **data) form = JWTValidation({"jwt": jwt, "seller": uuid}) assert form.is_valid(), form.errors
def test_bogus(self): form = JWTValidation({"jwt": "foo", "seller": uuid}) assert not form.is_valid() eq_("Not enough segments", form.errors["jwt"][0])