def dump_jwks(self): """ :return: A JWKS representation of the held keys """ res = [] for key in self._keys: res.append(b2s_conv(key.serialize())) return json.dumps({"keys": res})
def test_b2s_conv_raise_exception_on_bad_value(): with pytest.raises(ValueError): b2s_conv(object())