示例#1
0
    def test_json_loads_dumps(self):
        resource = {"a": 1, "b": [1, 2]}

        result = json.dumps(json.loads("""{"a": 1, "b": [1, 2]}"""))
        assert_equal(json.dumps(resource), result)

        assert_equal(json.loads(result), resource)
示例#2
0
    def test_json_loads_dumps(self):
        resource = {"a": 1, "b": [1, 2]}

        result = json.dumps(json.loads("""{"a": 1, "b": [1, 2]}"""))
        assert_equal(
            json.dumps(resource),
            result
        )

        assert_equal(
            json.loads(result),
            resource
        )