def test_display_json_value_keys_are_sorted(self): value = {'c': 'd', 'a': 'b'} assert_equals( scheming_display_json_value(value, indent=4), '{\n "a": "b", \n "c": "d"\n}')
def test_display_json_value_indent(self): value = {"a": "b"} assert ( scheming_display_json_value(value, indent=4) == '{\n "a": "b"\n}' )
def test_display_json_value_keys_are_sorted(self): value = {"c": "d", "a": "b"} if six.PY3: expected = '{\n "a": "b",\n "c": "d"\n}' else: expected = '{\n "a": "b", \n "c": "d"\n}' assert (scheming_display_json_value(value, indent=4) == expected)
def test_display_json_value_json_error(self): date = datetime.datetime.now() value = ('a', date) assert_equals(scheming_display_json_value(value), ('a', date))
def test_display_json_value_no_indent(self): value = {'a': 'b'} assert_equals( scheming_display_json_value(value, indent=None), '{"a": "b"}')
def test_display_json_value_indent(self): value = {'a': 'b'} assert_equals( scheming_display_json_value(value, indent=4), '{\n "a": "b"\n}')
def test_display_json_value_default(self): value = {'a': 'b'} assert_equals(scheming_display_json_value(value), '{\n "a": "b"\n}')
def test_display_json_value_json_error(self): date = datetime.datetime.now() value = ("a", date) assert scheming_display_json_value(value) == ("a", date)
def test_display_json_value_no_indent(self): value = {"a": "b"} assert scheming_display_json_value(value, indent=None) == '{"a": "b"}'
def test_display_json_value_default(self): value = {"a": "b"} assert scheming_display_json_value(value) == '{\n "a": "b"\n}'