aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_json_parser.py
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2020-01-27 20:34:16 -0600
committerEugene Triguba <eugenetriguba@gmail.com>2020-01-27 20:35:36 -0600
commite4b5dc647cbc560f5e9e1fa492b5653ca37a241c (patch)
treedc3f0884b0869737d608c29bb7b937426a025df7 /tests/test_json_parser.py
parentAdd start of json_parser implementaiton (diff)
downloadconfig-file-e4b5dc647cbc560f5e9e1fa492b5653ca37a241c.zip
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.
Diffstat (limited to 'tests/test_json_parser.py')
-rw-r--r--tests/test_json_parser.py6
1 files changed, 6 insertions, 0 deletions
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