def test_valid_str_to_builtin_fromjson(self):
        types = six.integer_types + (bool, float)
        value = '2'
        for t in types:
            for ba in True, False:
                jd = '%s' if ba else '{"a": %s}'
                i = parse(jd % value, {'a': t}, ba)
                self.assertEqual(
                    i, {'a': t(value)},
                    "Parsed value does not correspond for %s: "
                    "%s != {'a': %s}" % (
                        t, repr(i), repr(t(value))
                    )
                )
                self.assertIsInstance(i['a'], t)
dataset/ETHPy150Open openstack/wsme/wsme/tests/test_restjson.py/TestRestJson.test_valid_str_to_builtin_fromjson/original