Skip to content

Commit 6e94da1

Browse files
updated tests
1 parent 2997e43 commit 6e94da1

11 files changed

+536
-433
lines changed

tests/client/test_airflow_client.py

Lines changed: 0 additions & 69 deletions
This file was deleted.

tests/conftest.py

Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44

55

66
@pytest.fixture
7-
def mock_spec_file():
8-
"""Mock OpenAPI spec file for testing."""
9-
mock_spec = {
7+
def sample_openapi_spec():
8+
"""Sample OpenAPI spec for testing across multiple test files."""
9+
return {
1010
"openapi": "3.0.0",
1111
"info": {"title": "Airflow API", "version": "1.0.0"},
1212
"paths": {
1313
"/api/v1/dags": {
1414
"get": {
1515
"operationId": "get_dags",
16+
"summary": "Get all DAGs",
17+
"tags": ["DAGs"],
1618
"responses": {
1719
"200": {
1820
"description": "List of DAGs",
@@ -21,38 +23,9 @@ def mock_spec_file():
2123
},
2224
}
2325
},
24-
}
25-
},
26-
"/api/v1/dags/{dag_id}": {
27-
"get": {
28-
"operationId": "get_dag",
29-
"parameters": [{"name": "dag_id", "in": "path", "required": True, "schema": {"type": "string"}}],
30-
"responses": {"200": {"description": "Successful response", "content": {"application/json": {"schema": {"type": "object", "properties": {"dag_id": {"type": "string"}}}}}}},
31-
},
32-
"post": {
33-
"operationId": "post_dag_run",
34-
"parameters": [{"name": "dag_id", "in": "path", "required": True, "schema": {"type": "string"}}],
35-
"requestBody": {
36-
"content": {
37-
"application/json": {
38-
"schema": {
39-
"type": "object",
40-
"properties": {
41-
"conf": {"type": "object"},
42-
"dag_run_id": {"type": "string"},
43-
},
44-
}
45-
}
46-
}
47-
},
48-
"responses": {
49-
"200": {
50-
"description": "Successful response",
51-
"content": {"application/json": {"schema": {"type": "object", "properties": {"dag_run_id": {"type": "string"}, "state": {"type": "string"}}}}},
52-
}
53-
},
5426
},
27+
"post": {"operationId": "create_dag", "summary": "Create a DAG", "tags": ["DAGs"], "responses": {"201": {"description": "Created"}}},
5528
},
29+
"/api/v1/connections": {"get": {"operationId": "get_connections", "summary": "Get connections", "tags": ["Connections"], "responses": {"200": {"description": "Success"}}}},
5630
},
5731
}
58-
return mock_spec

tests/parser/test_operation_parser.py

Lines changed: 0 additions & 182 deletions
This file was deleted.

0 commit comments

Comments
 (0)