Skip to content

Commit

Permalink
add a test for the case when root element is a list
Browse files Browse the repository at this point in the history
  • Loading branch information
rolling-robot committed Sep 16, 2023
1 parent 7124b06 commit 6032ba4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@
{'bar': 'baz', 'qux': 42},
{'bar': 'bizzle'}
]}),
Params(string='[1].foo',
initial_data=[{'foo': 1},
{'bar': 2}],
insert_val=42,
target=[{'foo': 1},
{'foo': 42,
'bar': 2}],)
])
def test_update_or_create(string, initial_data, insert_val, target):
jsonpath = parse(string)
Expand Down

0 comments on commit 6032ba4

Please sign in to comment.