From 3fd0ab767dc8b7bff980afa18f13c6f347b5d0bd Mon Sep 17 00:00:00 2001 From: Eric Schmidt Date: Wed, 20 Oct 2021 10:31:31 -0700 Subject: [PATCH] test: adds type equivalency check to value_converter test (#630) Co-authored-by: Vinny Senthil --- tests/unit/enhanced_library/test_value_converter.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/unit/enhanced_library/test_value_converter.py b/tests/unit/enhanced_library/test_value_converter.py index b39512611b..4cbaeed7cf 100644 --- a/tests/unit/enhanced_library/test_value_converter.py +++ b/tests/unit/enhanced_library/test_value_converter.py @@ -63,9 +63,7 @@ def test_convert_value_to_message(): actual_from_value_output = value_converter.from_value(SomeMessage, input_value) expected_type = SomeMessage(input_dict) - # TODO: compare instance of SomeMessage against - # actual_from_value_output. - # See https://github.com/googleapis/python-aiplatform/issues/136 + assert actual_from_value_output.__class__.__name__ == SomeMessage.__name__ # Check property-level ("duck-typing") equivalency assert actual_from_value_output.test_str == expected_type.test_str @@ -79,9 +77,7 @@ def test_convert_map_to_message(): map_composite = message_with_map.test_map actual_output = value_converter.from_map(SomeOutType, map_composite) - # TODO: compare instance of SomeMessage against - # actual_from_value_output. - # See https://github.com/googleapis/python-aiplatform/issues/136 + assert actual_output.__class__.__name__ == SomeOutType.__name__ # Check property-to-key/value equivalency assert actual_output.test_int == map_composite["test_int"]