From 20a73a5f293492b9490f4fec3a060cc173c879f8 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 19 Jun 2013 10:41:28 +0100 Subject: Add transform_json method --- tests/jq_tests.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/jq_tests.py b/tests/jq_tests.py index 348727c..6e9066b 100644 --- a/tests/jq_tests.py +++ b/tests/jq_tests.py @@ -4,13 +4,21 @@ from jq import jq @istest -def dot_operator_does_nothing(): +def dot_operator_does_nothing_to_string_input(): assert_equal( "42", str(jq(".").transform_string("42")) ) +@istest +def dot_operator_does_nothing_to_json_input(): + assert_equal( + '"42"', + str(jq(".").transform_json("42")) + ) + + @istest def can_add_one_to_each_element_of_an_array(): assert_equal( -- cgit v1.2.3