This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
user actions: added pytest-vcr for airflow
- Loading branch information
Showing
10 changed files
with
476 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
...ce/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_accept_author.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
interactions: | ||
- request: | ||
body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": | ||
"00000000-0000-0000-0000-000000000000"}}' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '119' | ||
Content-Type: | ||
- application/json | ||
method: POST | ||
uri: http://airflow-webserver:8080/api/v1/dags/author_create_initialization_dag/dagRuns | ||
response: | ||
body: | ||
string: "{\n \"detail\": \"DAGRun with DAG ID: 'author_create_initialization_dag' | ||
and DAGRun ID: '00000000-0000-0000-0000-000000000000' already exists\",\n | ||
\ \"status\": 409,\n \"title\": \"Conflict\",\n \"type\": \"https://airflow.apache.org/docs/apache-airflow/2.8.3/stable-rest-api-ref.html#section/Errors/AlreadyExists\"\n}\n" | ||
headers: | ||
Connection: | ||
- close | ||
Content-Length: | ||
- '302' | ||
Content-Type: | ||
- application/problem+json | ||
Date: | ||
- Fri, 26 Jul 2024 13:52:28 GMT | ||
Server: | ||
- gunicorn | ||
X-Robots-Tag: | ||
- noindex, nofollow | ||
status: | ||
code: 409 | ||
message: CONFLICT | ||
- request: | ||
body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": | ||
"00000000-0000-0000-0000-000000000000", "create_ticket": true}}' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '142' | ||
Content-Type: | ||
- application/json | ||
method: POST | ||
uri: http://airflow-webserver:8080/api/v1/dags/author_create_approved_dag/dagRuns | ||
response: | ||
body: | ||
string: "{\n \"conf\": {\n \"create_ticket\": true,\n \"workflow_id\": | ||
\"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_approved_dag\",\n | ||
\ \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n \"data_interval_end\": | ||
\"2024-07-26T13:52:28.878645+00:00\",\n \"data_interval_start\": \"2024-07-26T13:52:28.878645+00:00\",\n | ||
\ \"end_date\": null,\n \"execution_date\": \"2024-07-26T13:52:28.878645+00:00\",\n | ||
\ \"external_trigger\": true,\n \"last_scheduling_decision\": null,\n \"logical_date\": | ||
\"2024-07-26T13:52:28.878645+00:00\",\n \"note\": null,\n \"run_type\": | ||
\"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" | ||
headers: | ||
Connection: | ||
- close | ||
Content-Length: | ||
- '600' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Fri, 26 Jul 2024 13:52:28 GMT | ||
Server: | ||
- gunicorn | ||
X-Robots-Tag: | ||
- noindex, nofollow | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
85 changes: 85 additions & 0 deletions
85
...ce/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_create_author.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
interactions: | ||
- request: | ||
body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": | ||
"00000000-0000-0000-0000-000000000000"}}' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '119' | ||
Content-Type: | ||
- application/json | ||
method: POST | ||
uri: http://airflow-webserver:8080/api/v1/dags/author_create_initialization_dag/dagRuns | ||
response: | ||
body: | ||
string: "{\n \"detail\": \"DAGRun with DAG ID: 'author_create_initialization_dag' | ||
and DAGRun ID: '00000000-0000-0000-0000-000000000000' already exists\",\n | ||
\ \"status\": 409,\n \"title\": \"Conflict\",\n \"type\": \"https://airflow.apache.org/docs/apache-airflow/2.8.3/stable-rest-api-ref.html#section/Errors/AlreadyExists\"\n}\n" | ||
headers: | ||
Connection: | ||
- close | ||
Content-Length: | ||
- '302' | ||
Content-Type: | ||
- application/problem+json | ||
Date: | ||
- Fri, 26 Jul 2024 13:52:29 GMT | ||
Server: | ||
- gunicorn | ||
X-Robots-Tag: | ||
- noindex, nofollow | ||
status: | ||
code: 409 | ||
message: CONFLICT | ||
- request: | ||
body: '{"dag_run_id": "3e9f6f3b-a0b1-411b-b061-0e607ca9b695", "conf": {"workflow_id": | ||
"3e9f6f3b-a0b1-411b-b061-0e607ca9b695", "native_name": "NATIVE_NAME", "alternate_name": | ||
"NAME", "display_name": "FIRST_NAME", "family_name": "LAST_NAME", "given_name": | ||
"GIVEN_NAME"}}' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '261' | ||
Content-Type: | ||
- application/json | ||
method: POST | ||
uri: http://airflow-webserver:8080/api/v1/dags/author_create_initialization_dag/dagRuns | ||
response: | ||
body: | ||
string: "{\n \"conf\": {\n \"alternate_name\": \"NAME\",\n \"display_name\": | ||
\"FIRST_NAME\",\n \"family_name\": \"LAST_NAME\",\n \"given_name\": | ||
\"GIVEN_NAME\",\n \"native_name\": \"NATIVE_NAME\",\n \"workflow_id\": | ||
\"3e9f6f3b-a0b1-411b-b061-0e607ca9b695\"\n },\n \"dag_id\": \"author_create_initialization_dag\",\n | ||
\ \"dag_run_id\": \"3e9f6f3b-a0b1-411b-b061-0e607ca9b695\",\n \"data_interval_end\": | ||
\"2024-07-26T13:52:29.169946+00:00\",\n \"data_interval_start\": \"2024-07-26T13:52:29.169946+00:00\",\n | ||
\ \"end_date\": null,\n \"execution_date\": \"2024-07-26T13:52:29.169946+00:00\",\n | ||
\ \"external_trigger\": true,\n \"last_scheduling_decision\": null,\n \"logical_date\": | ||
\"2024-07-26T13:52:29.169946+00:00\",\n \"note\": null,\n \"run_type\": | ||
\"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" | ||
headers: | ||
Connection: | ||
- close | ||
Content-Length: | ||
- '741' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Fri, 26 Jul 2024 13:52:29 GMT | ||
Server: | ||
- gunicorn | ||
X-Robots-Tag: | ||
- noindex, nofollow | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
81 changes: 81 additions & 0 deletions
81
...ce/backoffice/workflows/tests/cassettes/TestAuthorWorkflowViewSet.test_reject_author.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
interactions: | ||
- request: | ||
body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": | ||
"00000000-0000-0000-0000-000000000000"}}' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '119' | ||
Content-Type: | ||
- application/json | ||
method: POST | ||
uri: http://airflow-webserver:8080/api/v1/dags/author_create_initialization_dag/dagRuns | ||
response: | ||
body: | ||
string: "{\n \"detail\": \"DAGRun with DAG ID: 'author_create_initialization_dag' | ||
and DAGRun ID: '00000000-0000-0000-0000-000000000000' already exists\",\n | ||
\ \"status\": 409,\n \"title\": \"Conflict\",\n \"type\": \"https://airflow.apache.org/docs/apache-airflow/2.8.3/stable-rest-api-ref.html#section/Errors/AlreadyExists\"\n}\n" | ||
headers: | ||
Connection: | ||
- close | ||
Content-Length: | ||
- '302' | ||
Content-Type: | ||
- application/problem+json | ||
Date: | ||
- Fri, 26 Jul 2024 13:52:29 GMT | ||
Server: | ||
- gunicorn | ||
X-Robots-Tag: | ||
- noindex, nofollow | ||
status: | ||
code: 409 | ||
message: CONFLICT | ||
- request: | ||
body: '{"dag_run_id": "00000000-0000-0000-0000-000000000000", "conf": {"workflow_id": | ||
"00000000-0000-0000-0000-000000000000", "create_ticket": true}}' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '142' | ||
Content-Type: | ||
- application/json | ||
method: POST | ||
uri: http://airflow-webserver:8080/api/v1/dags/author_create_rejected_dag/dagRuns | ||
response: | ||
body: | ||
string: "{\n \"conf\": {\n \"create_ticket\": true,\n \"workflow_id\": | ||
\"00000000-0000-0000-0000-000000000000\"\n },\n \"dag_id\": \"author_create_rejected_dag\",\n | ||
\ \"dag_run_id\": \"00000000-0000-0000-0000-000000000000\",\n \"data_interval_end\": | ||
\"2024-07-26T13:52:29.424234+00:00\",\n \"data_interval_start\": \"2024-07-26T13:52:29.424234+00:00\",\n | ||
\ \"end_date\": null,\n \"execution_date\": \"2024-07-26T13:52:29.424234+00:00\",\n | ||
\ \"external_trigger\": true,\n \"last_scheduling_decision\": null,\n \"logical_date\": | ||
\"2024-07-26T13:52:29.424234+00:00\",\n \"note\": null,\n \"run_type\": | ||
\"manual\",\n \"start_date\": null,\n \"state\": \"queued\"\n}\n" | ||
headers: | ||
Connection: | ||
- close | ||
Content-Length: | ||
- '600' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Fri, 26 Jul 2024 13:52:29 GMT | ||
Server: | ||
- gunicorn | ||
X-Robots-Tag: | ||
- noindex, nofollow | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
Oops, something went wrong.