Skip to content

Commit e09f5f8

Browse files
committed
Small change in integration test
1 parent 7573bbd commit e09f5f8

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

testing.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from pyatlan.client.atlan import AtlanClient
2+
from pyatlan.model.enums import AtlanWorkflowPhase
3+
4+
client = AtlanClient()
5+
runs_status = client.workflow.find_by_status_and_interval(
6+
[AtlanWorkflowPhase.RUNNING], 1
7+
)
8+
print(runs_status)

tests/integration/test_workflow_client.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,17 @@ def test_workflow_get_runs_and_stop(client: AtlanClient, workflow: WorkflowRespo
162162
workflow_status = client.workflow.monitor(workflow_name=workflow_name)
163163
assert workflow_status == AtlanWorkflowPhase.FAILED
164164

165-
# Test find run by status and interval
165+
# Test find run by id
166+
workflow_run = client.workflow.find_run_by_id(id=run.id)
167+
assert (
168+
workflow_run
169+
and workflow_run.source
170+
and workflow_run.source.status
171+
and workflow_run.source.status.phase == AtlanWorkflowPhase.FAILED
172+
)
173+
174+
175+
def test_workflow_find_by_status_and_interval(client: AtlanClient):
166176
runs_status = client.workflow.find_by_status_and_interval(
167177
[AtlanWorkflowPhase.FAILED], 1
168178
)
@@ -175,15 +185,6 @@ def test_workflow_get_runs_and_stop(client: AtlanClient, workflow: WorkflowRespo
175185
and workflow_run_status.source.status.phase == AtlanWorkflowPhase.FAILED
176186
)
177187

178-
# Test find run by id
179-
workflow_run = client.workflow.find_run_by_id(id=run.id)
180-
assert (
181-
workflow_run
182-
and workflow_run.source
183-
and workflow_run.source.status
184-
and workflow_run.source.status.phase == AtlanWorkflowPhase.FAILED
185-
)
186-
187188

188189
def test_workflow_get_all_scheduled_runs(
189190
client: AtlanClient, workflow: WorkflowResponse

0 commit comments

Comments
 (0)