Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@

from __future__ import annotations

from http.client import HTTPException
from typing import Annotated

from fastapi import Depends, status
from fastapi import Depends, HTTPException, status
from sqlalchemy import and_, func, select
from sqlalchemy.orm import defaultload

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,13 @@ def test_latest_run_should_response_403(self, unauthorized_test_client):
response = unauthorized_test_client.get(f"/dags/{DAG1_ID}/latest_run")
assert response.status_code == 403

def test_latest_run_should_response_400_when_dag_id_is_tilde(self, test_client):
response = test_client.get("/dags/~/latest_run")
assert response.status_code == 400
assert response.json() == {
"detail": "`~` was supplied as dag_id, but querying multiple dags is not supported."
}

@pytest.mark.parametrize(
("query_params", "expected_dag_count"),
[
Expand Down
Loading