From e4b5dc647cbc560f5e9e1fa492b5653ca37a241c Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Mon, 27 Jan 2020 20:34:16 -0600 Subject: Add nested_lookup, and get test working for json has() and stringify() nested_lookup is a dependency that will help working with XML, YAML, and JSON since we can search deeply nested structures easily with it. --- tests/test_json_parser.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/test_json_parser.py') diff --git a/tests/test_json_parser.py b/tests/test_json_parser.py index ad5c053..b829b7d 100644 --- a/tests/test_json_parser.py +++ b/tests/test_json_parser.py @@ -62,3 +62,9 @@ test_json = { def test_that_json_parser_can_find_keys(test_input, expected_result): parser = JsonParser(json.dumps(test_json)) assert parser.has(test_input) == expected_result + + +def test_that_json_parser_can_stringify(): + json_str = '{"test": 5, "blah": true}' + parser = JsonParser(json_str) + assert parser.stringify() == json_str -- cgit v1.2.3