예제 #1
0
 def test_variant_json_load(self):
     variant = ExperimentVariant()
     variant.value = '{"key": "value"}'
     self.assertEqual(variant.json_load_value, {"key": "value"})
예제 #2
0
 def test_variant_json_dumps(self):
     variant = ExperimentVariant()
     variant.value = '{"key": "value","key1":"value1"}'
     expected_value = json.dumps({"key": "value", "key1": "value1"}, indent=2)
     self.assertEqual(variant.json_dumps_value, expected_value)