Skip to content

Commit

Permalink
Fix tests for new params.
Browse files Browse the repository at this point in the history
  • Loading branch information
chr15m committed May 16, 2019
1 parent 1179d2a commit a3d48d9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion multidimensional_urlencode/tests/test_urlencode.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,11 @@ def test_no_array_braces():
"""Verify that array braces can be left off."""
d = {'a': {"b": [1, 2, 3]}}
expected = "a[b]=1&a[b]=2&a[b]=3"
assert unquote(urlencode(d)) == expected
assert unquote(urlencode(d, array_braces=False)) == expected


def test_encode_list_key():
"""Verify that list indexes are explicitly added."""
d = {'a': {"b": [1, 2, 3]}}
expected = "a[b][0]=1&a[b][1]=2&a[b][2]=3"
assert unquote(urlencode(d, encode_list_key=True)) == expected

0 comments on commit a3d48d9

Please sign in to comment.