def test_validate_token_on_post_shared_secret_not_set(flask_client):
    with set_environment({}):
        auth_header = build_token_auth_header()
        response = flask_client.post(HOST_URL, headers=auth_header)
        assert 401 == response.status_code
def test_validate_invalid_token_on_post(flask_client):
    auth_header = build_token_auth_header("NotTheSuperSecretValue")
    response = flask_client.post(HOST_URL, headers=auth_header)
    assert 401 == response.status_code