add some test proto2 supported, add js proto2 supported, fixed some error
diff --git a/conformance/conformance_python.py b/conformance/conformance_python.py index 62cfce8..c5ba246 100755 --- a/conformance/conformance_python.py +++ b/conformance/conformance_python.py
@@ -38,6 +38,8 @@ import struct import sys import os +from google.protobuf import descriptor +from google.protobuf import descriptor_pool from google.protobuf import json_format from google.protobuf import message from google.protobuf import test_messages_proto3_pb2 @@ -54,15 +56,16 @@ pass def do_test(request): - isProto3 = (request.message_type == "protobuf_test_messages.proto3.TestAllTypes") + isProto3 = (request.message_type == "protobuf_test_messages.proto3.TestAllTypesProto3") isJson = (request.WhichOneof('payload') == 'json_payload') isProto2 = (request.message_type == "protobuf_test_messages.proto2.TestAllTypesProto2") if (not isProto3) and (not isJson) and (not isProto2): raise ProtocolError("Protobuf request doesn't have specific payload type") - + test_message = test_messages_proto2_pb2.TestAllTypesProto2() if isProto2 else \ - test_messages_proto3_pb2.TestAllTypes() + test_messages_proto3_pb2.TestAllTypesProto3() + response = conformance_pb2.ConformanceResponse() try: