def dropkey(machine): remote_user = request.environ['REMOTE_USER'] if not machine: return flask.Response('Missing key name', status=400) # base64 decode the machine name (must not be unicode) machine = urlsafe_b64decode(str(machine)) flask.g.store.dropkey(remote_user, machine) return flask.Response(status=200)
def test_listkeys64(): keys = (('a', 'zxcv', 'asdf'),) for a, b, c in util.listkeys64(keys): assert util.urlsafe_b64decode(b) == keys[0][1]