Skip to content

Commit

Permalink
Fix black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
treff7es committed Aug 28, 2024
1 parent 8b9548f commit 0422477
Showing 1 changed file with 189 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -603,82 +603,222 @@ def test_emit_flow(
assert mock_emitter.method_calls[5][1][0].entityUrn == expected_dataflow_urn

# DataProcessInstance assertions for the flow
assert mock_emitter.method_calls[10][1][0].aspectName == "dataProcessInstanceProperties"
assert mock_emitter.method_calls[10][1][0].entityUrn == "urn:li:dataProcessInstance:56231547bcc2781e0c14182ceab6c9ac"
assert mock_emitter.method_calls[11][1][0].aspectName == "dataProcessInstanceRelationships"
assert mock_emitter.method_calls[11][1][0].entityUrn == "urn:li:dataProcessInstance:56231547bcc2781e0c14182ceab6c9ac"
assert mock_emitter.method_calls[12][1][0].aspectName == "dataProcessInstanceRunEvent"
assert mock_emitter.method_calls[12][1][0].entityUrn == "urn:li:dataProcessInstance:56231547bcc2781e0c14182ceab6c9ac"
assert (
mock_emitter.method_calls[10][1][0].aspectName
== "dataProcessInstanceProperties"
)
assert (
mock_emitter.method_calls[10][1][0].entityUrn
== "urn:li:dataProcessInstance:56231547bcc2781e0c14182ceab6c9ac"
)
assert (
mock_emitter.method_calls[11][1][0].aspectName
== "dataProcessInstanceRelationships"
)
assert (
mock_emitter.method_calls[11][1][0].entityUrn
== "urn:li:dataProcessInstance:56231547bcc2781e0c14182ceab6c9ac"
)
assert (
mock_emitter.method_calls[12][1][0].aspectName == "dataProcessInstanceRunEvent"
)
assert (
mock_emitter.method_calls[12][1][0].entityUrn
== "urn:li:dataProcessInstance:56231547bcc2781e0c14182ceab6c9ac"
)

# DataJob assertions for extract
assert mock_emitter.method_calls[13][1][0].aspectName == "dataJobInfo"
assert mock_emitter.method_calls[13][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.extract)"
assert (
mock_emitter.method_calls[13][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.extract)"
)
assert mock_emitter.method_calls[14][1][0].aspectName == "status"
assert mock_emitter.method_calls[14][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.extract)"
assert (
mock_emitter.method_calls[14][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.extract)"
)
assert mock_emitter.method_calls[15][1][0].aspectName == "dataJobInputOutput"
assert mock_emitter.method_calls[15][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.extract)"
assert (
mock_emitter.method_calls[15][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.extract)"
)
assert mock_emitter.method_calls[16][1][0].aspectName == "ownership"
assert mock_emitter.method_calls[16][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.extract)"
assert (
mock_emitter.method_calls[16][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.extract)"
)
assert mock_emitter.method_calls[17][1][0].aspectName == "globalTags"
assert mock_emitter.method_calls[17][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.extract)"
assert (
mock_emitter.method_calls[17][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.extract)"
)
assert mock_emitter.method_calls[18][1][0].aspectName == "browsePaths"
assert mock_emitter.method_calls[18][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.extract)"
assert (
mock_emitter.method_calls[18][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.extract)"
)

# DataProcessInstance assertions for extract
assert mock_emitter.method_calls[19][1][0].aspectName == "dataProcessInstanceProperties"
assert mock_emitter.method_calls[19][1][0].entityUrn == "urn:li:dataProcessInstance:b048ba729c1403f229a0760f8765d691"
assert mock_emitter.method_calls[20][1][0].aspectName == "dataProcessInstanceRelationships"
assert mock_emitter.method_calls[20][1][0].entityUrn == "urn:li:dataProcessInstance:b048ba729c1403f229a0760f8765d691"
assert mock_emitter.method_calls[21][1][0].aspectName == "dataProcessInstanceRunEvent"
assert mock_emitter.method_calls[21][1][0].entityUrn == "urn:li:dataProcessInstance:b048ba729c1403f229a0760f8765d691"
assert mock_emitter.method_calls[22][1][0].aspectName == "dataProcessInstanceRunEvent"
assert mock_emitter.method_calls[22][1][0].entityUrn == "urn:li:dataProcessInstance:b048ba729c1403f229a0760f8765d691"
assert (
mock_emitter.method_calls[19][1][0].aspectName
== "dataProcessInstanceProperties"
)
assert (
mock_emitter.method_calls[19][1][0].entityUrn
== "urn:li:dataProcessInstance:b048ba729c1403f229a0760f8765d691"
)
assert (
mock_emitter.method_calls[20][1][0].aspectName
== "dataProcessInstanceRelationships"
)
assert (
mock_emitter.method_calls[20][1][0].entityUrn
== "urn:li:dataProcessInstance:b048ba729c1403f229a0760f8765d691"
)
assert (
mock_emitter.method_calls[21][1][0].aspectName == "dataProcessInstanceRunEvent"
)
assert (
mock_emitter.method_calls[21][1][0].entityUrn
== "urn:li:dataProcessInstance:b048ba729c1403f229a0760f8765d691"
)
assert (
mock_emitter.method_calls[22][1][0].aspectName == "dataProcessInstanceRunEvent"
)
assert (
mock_emitter.method_calls[22][1][0].entityUrn
== "urn:li:dataProcessInstance:b048ba729c1403f229a0760f8765d691"
)

# DataJob assertions for load
assert mock_emitter.method_calls[23][1][0].aspectName == "dataJobInfo"
assert mock_emitter.method_calls[23][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.load)"
assert (
mock_emitter.method_calls[23][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.load)"
)
assert mock_emitter.method_calls[24][1][0].aspectName == "status"
assert mock_emitter.method_calls[24][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.load)"
assert (
mock_emitter.method_calls[24][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.load)"
)
assert mock_emitter.method_calls[25][1][0].aspectName == "dataJobInputOutput"
assert mock_emitter.method_calls[25][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.load)"
assert (
mock_emitter.method_calls[25][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.load)"
)
assert mock_emitter.method_calls[26][1][0].aspectName == "ownership"
assert mock_emitter.method_calls[26][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.load)"
assert (
mock_emitter.method_calls[26][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.load)"
)
assert mock_emitter.method_calls[27][1][0].aspectName == "globalTags"
assert mock_emitter.method_calls[27][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.load)"
assert (
mock_emitter.method_calls[27][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.load)"
)
assert mock_emitter.method_calls[28][1][0].aspectName == "browsePaths"
assert mock_emitter.method_calls[28][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.load)"
assert (
mock_emitter.method_calls[28][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.load)"
)

# DataProcessInstance assertions for load
assert mock_emitter.method_calls[29][1][0].aspectName == "dataProcessInstanceProperties"
assert mock_emitter.method_calls[29][1][0].entityUrn == "urn:li:dataProcessInstance:e7df9fe09bb4da19687b8199e5ee5038"
assert mock_emitter.method_calls[30][1][0].aspectName == "dataProcessInstanceRelationships"
assert mock_emitter.method_calls[30][1][0].entityUrn == "urn:li:dataProcessInstance:e7df9fe09bb4da19687b8199e5ee5038"
assert mock_emitter.method_calls[31][1][0].aspectName == "dataProcessInstanceRunEvent"
assert mock_emitter.method_calls[31][1][0].entityUrn == "urn:li:dataProcessInstance:e7df9fe09bb4da19687b8199e5ee5038"
assert mock_emitter.method_calls[32][1][0].aspectName == "dataProcessInstanceRunEvent"
assert mock_emitter.method_calls[32][1][0].entityUrn == "urn:li:dataProcessInstance:e7df9fe09bb4da19687b8199e5ee5038"
assert (
mock_emitter.method_calls[29][1][0].aspectName
== "dataProcessInstanceProperties"
)
assert (
mock_emitter.method_calls[29][1][0].entityUrn
== "urn:li:dataProcessInstance:e7df9fe09bb4da19687b8199e5ee5038"
)
assert (
mock_emitter.method_calls[30][1][0].aspectName
== "dataProcessInstanceRelationships"
)
assert (
mock_emitter.method_calls[30][1][0].entityUrn
== "urn:li:dataProcessInstance:e7df9fe09bb4da19687b8199e5ee5038"
)
assert (
mock_emitter.method_calls[31][1][0].aspectName == "dataProcessInstanceRunEvent"
)
assert (
mock_emitter.method_calls[31][1][0].entityUrn
== "urn:li:dataProcessInstance:e7df9fe09bb4da19687b8199e5ee5038"
)
assert (
mock_emitter.method_calls[32][1][0].aspectName == "dataProcessInstanceRunEvent"
)
assert (
mock_emitter.method_calls[32][1][0].entityUrn
== "urn:li:dataProcessInstance:e7df9fe09bb4da19687b8199e5ee5038"
)

# DataJob assertions for transform
assert mock_emitter.method_calls[33][1][0].aspectName == "dataJobInfo"
assert mock_emitter.method_calls[33][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.transform)"
assert (
mock_emitter.method_calls[33][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.transform)"
)
assert mock_emitter.method_calls[34][1][0].aspectName == "status"
assert mock_emitter.method_calls[34][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.transform)"
assert (
mock_emitter.method_calls[34][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.transform)"
)
assert mock_emitter.method_calls[35][1][0].aspectName == "dataJobInputOutput"
assert mock_emitter.method_calls[35][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.transform)"
assert (
mock_emitter.method_calls[35][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.transform)"
)
assert mock_emitter.method_calls[36][1][0].aspectName == "ownership"
assert mock_emitter.method_calls[36][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.transform)"
assert (
mock_emitter.method_calls[36][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.transform)"
)
assert mock_emitter.method_calls[37][1][0].aspectName == "globalTags"
assert mock_emitter.method_calls[37][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.transform)"
assert mock_emitter.method_calls[37][1][0].aspect.tags[0].tag == f"urn:li:tag:{task_run_ctx.task.tags[0]}"
assert (
mock_emitter.method_calls[37][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.transform)"
)
assert (
mock_emitter.method_calls[37][1][0].aspect.tags[0].tag
== f"urn:li:tag:{task_run_ctx.task.tags[0]}"
)
assert mock_emitter.method_calls[38][1][0].aspectName == "browsePaths"
assert mock_emitter.method_calls[38][1][0].entityUrn == f"urn:li:dataJob:({expected_dataflow_urn},__main__.transform)"
assert (
mock_emitter.method_calls[38][1][0].entityUrn
== f"urn:li:dataJob:({expected_dataflow_urn},__main__.transform)"
)

# DataProcessInstance assertions for transform
assert mock_emitter.method_calls[39][1][0].aspectName == "dataProcessInstanceProperties"
assert mock_emitter.method_calls[39][1][0].entityUrn == "urn:li:dataProcessInstance:bfa255d4d1fba52d23a52c9de4f6d0a6"
assert mock_emitter.method_calls[40][1][0].aspectName == "dataProcessInstanceRelationships"
assert mock_emitter.method_calls[40][1][0].entityUrn == "urn:li:dataProcessInstance:bfa255d4d1fba52d23a52c9de4f6d0a6"
assert mock_emitter.method_calls[41][1][0].aspectName == "dataProcessInstanceRunEvent"
assert mock_emitter.method_calls[41][1][0].entityUrn == "urn:li:dataProcessInstance:bfa255d4d1fba52d23a52c9de4f6d0a6"
assert mock_emitter.method_calls[42][1][0].aspectName == "dataProcessInstanceRunEvent"
assert mock_emitter.method_calls[42][1][0].entityUrn == "urn:li:dataProcessInstance:bfa255d4d1fba52d23a52c9de4f6d0a6"
assert (
mock_emitter.method_calls[39][1][0].aspectName
== "dataProcessInstanceProperties"
)
assert (
mock_emitter.method_calls[39][1][0].entityUrn
== "urn:li:dataProcessInstance:bfa255d4d1fba52d23a52c9de4f6d0a6"
)
assert (
mock_emitter.method_calls[40][1][0].aspectName
== "dataProcessInstanceRelationships"
)
assert (
mock_emitter.method_calls[40][1][0].entityUrn
== "urn:li:dataProcessInstance:bfa255d4d1fba52d23a52c9de4f6d0a6"
)
assert (
mock_emitter.method_calls[41][1][0].aspectName == "dataProcessInstanceRunEvent"
)
assert (
mock_emitter.method_calls[41][1][0].entityUrn
== "urn:li:dataProcessInstance:bfa255d4d1fba52d23a52c9de4f6d0a6"
)
assert (
mock_emitter.method_calls[42][1][0].aspectName == "dataProcessInstanceRunEvent"
)
assert (
mock_emitter.method_calls[42][1][0].entityUrn
== "urn:li:dataProcessInstance:bfa255d4d1fba52d23a52c9de4f6d0a6"
)

0 comments on commit 0422477

Please sign in to comment.