Ejemplo n.º 1
0
    def test_value_to_json_for_class_type_any(self):
        json = serialize._value_to_json(Dict[str, Any], DICT_WITH_ANY)
        self.assertEqual(json, DICT_WITH_ANY)

        json = serialize._value_to_json(Any, [1, "test", 0.01])
        self.assertEqual(json, SAMPLE_ANY)
Ejemplo n.º 2
0
 def test_value_to_json(self):
     print()
     json = serialize._value_to_json(Union[str, int], 6)
     self.assertEqual(SAMPLE_INT_JSON, json)