def METHOD_NAME(
    query_body: MutableMapping[str, Any],
    expected_entity: EntityKey,
) -> None:
    dataset = get_dataset("discover")
    # HACK until these are converted to proper SnQL queries
    if not query_body.get("conditions"):
        query_body["conditions"] = []
    query_body["conditions"] += [
        ["timestamp", ">=", "2020-01-01T12:00:00"],
        ["timestamp", "<", "2020-01-02T12:00:00"],
        ["project_id", "=", 1],
    ]
    if not query_body.get("selected_columns"):
        query_body["selected_columns"] = ["project_id"]
    request = json_to_snql(query_body, "discover")
    request.validate()
    query, _ = parse_snql_query(str(request.query), dataset)
    entity = query.get_from_clause()
    assert isinstance(entity, EntitySource)
    assert entity.key == expected_entity