Use default yaml for testing
This commit is contained in:
@@ -18,15 +18,11 @@ def create_valid_spec(paths: dict[str, Any] | None = None) -> dict[str, Any]:
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def spec_file() -> dict[str, Any]:
|
def client() -> AirflowClient:
|
||||||
with resources.files("tests.client").joinpath("v1.yaml").open("r") as f:
|
with resources.files("airflow_mcp_server.resources").joinpath("v1.yaml").open("rb") as f:
|
||||||
return yaml.safe_load(f)
|
spec = yaml.safe_load(f)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
|
||||||
def client(spec_file: dict[str, Any]) -> AirflowClient:
|
|
||||||
return AirflowClient(
|
return AirflowClient(
|
||||||
spec_path=spec_file,
|
spec_path=spec,
|
||||||
base_url="http://localhost:8080/api/v1",
|
base_url="http://localhost:8080/api/v1",
|
||||||
auth_token="test-token",
|
auth_token="test-token",
|
||||||
)
|
)
|
||||||
@@ -84,9 +80,9 @@ def test_ops_case_sensitive_operation(client: AirflowClient) -> None:
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_exec_without_context(spec_file: dict[str, Any]) -> None:
|
async def test_exec_without_context() -> None:
|
||||||
client = AirflowClient(
|
client = AirflowClient(
|
||||||
spec_path=spec_file,
|
spec_path=create_valid_spec(),
|
||||||
base_url="http://test",
|
base_url="http://test",
|
||||||
auth_token="test",
|
auth_token="test",
|
||||||
)
|
)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user