Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit eceed06

Browse files
committed
added test
1 parent dfe9b76 commit eceed06

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/unit/utils/test_json.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
import json
22

3-
from localstack.utils.json import BytesEncoder
3+
from localstack.utils.json import BytesEncoder, assign_to_path
44

55

66
def test_json_encoder():
77
payload = {"foo": b"foobar"}
88
result = json.dumps(payload, cls=BytesEncoder)
99
assert result == '{"foo": "Zm9vYmFy"}'
10+
11+
12+
def test_assign_to_path_single_path():
13+
target = {}
14+
assign_to_path(target, "foo", "bar")
15+
assert target == {"foo": "bar"}

0 commit comments

Comments
 (0)