Ejemplo n.º 1
0
 def test_json_encoded_obj(self):
     obj = {"a": 5, "b": ["a", "g", 5]}
     val = '{"a": 5, "b": ["a", "g", 5]}'
     jsonObj = JSONEncodedDict()
     resp = jsonObj.process_bind_param(obj, "dialect")
     self.assertIn('"a": 5', resp)
     self.assertIn('"b": ["a", "g", 5]', resp)
     self.assertEqual(jsonObj.process_result_value(val, "dialect"), obj)
Ejemplo n.º 2
0
 def test_json_encoded_obj(self):
     obj = {'a': 5, 'b': ['a', 'g', 5]}
     val = '{"a": 5, "b": ["a", "g", 5]}'
     jsonObj = JSONEncodedDict()
     resp = jsonObj.process_bind_param(obj, 'dialect')
     self.assertIn('"a": 5', resp)
     self.assertIn('"b": ["a", "g", 5]', resp)
     self.assertEquals(jsonObj.process_result_value(val, 'dialect'), obj)