Skip to content

Commit

Permalink
fixed funnel position (#224)
Browse files Browse the repository at this point in the history
* fixed funnel position, added test and contribution markdown

* removed duplicate file
  • Loading branch information
Geocali committed Nov 1, 2020
1 parent 164351e commit f54f204
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nipyapi/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1536,13 +1536,13 @@ def create_funnel(pg_id, position=None):
return nipyapi.nifi.ProcessGroupsApi().create_funnel(
id=pg_id,
body=nipyapi.nifi.FunnelEntity(
position=nipyapi.nifi.PositionDTO(
x=float(position[0]),
y=float(position[1])
),
revision=nipyapi.nifi.RevisionDTO(version=0),
component=nipyapi.nifi.FunnelDTO(
parent_group_id=pg_id
parent_group_id=pg_id,
position=nipyapi.nifi.PositionDTO(
x=float(position[0]),
y=float(position[1])
),
)
)
)
Expand Down
2 changes: 2 additions & 0 deletions tests/test_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,8 @@ def test_connect_output_ports(regress_nifi, fix_pg):
def test_create_funnel(regress_nifi, fix_funnel):
f_f1 = fix_funnel.generate()
assert isinstance(f_f1, nifi.FunnelEntity)
assert f_f1.component.position.x == 400
assert f_f1.component.position.y == 400


def test_delete_funnel(regress_nifi, fix_funnel):
Expand Down

0 comments on commit f54f204

Please sign in to comment.