def METHOD_NAME():
    client = boto3.client("apigateway", region_name="us-west-2")
    stage_name = "staging"
    response = client.create_rest_api(name="my_api", description="this is my api")
    api_id = response["id"]
    resources = client.get_resources(restApiId=api_id)
    root_id = [r for r in resources["items"] if r["path"] == "/"][0]["id"]
    client.put_method(
        restApiId=api_id, resourceId=root_id, httpMethod="GET", authorizationType="NONE"
    )
    with pytest.raises(ClientError) as ex:
        client.create_deployment(restApiId=api_id, stageName=stage_name)["id"]
    assert ex.value.response["Error"]["Code"] == "NotFoundException"
    assert ex.value.response["Error"]["Message"] == "No integration defined for method"