示例#1
0
    def encoded_partial(self):
        proto = protorpc_test_pb2.OptionalMessage()
        proto.double_value = 1.23
        proto.int64_value = -100000000000
        proto.int32_value = 1020
        proto.string_value = u'a string'
        proto.enum_value = protorpc_test_pb2.OptionalMessage.VAL2

        return proto.SerializeToString()
示例#2
0
    def encoded_full(self):
        proto = protorpc_test_pb2.OptionalMessage()
        proto.double_value = 1.23
        proto.float_value = -2.5
        proto.int64_value = -100000000000
        proto.uint64_value = 102020202020
        proto.int32_value = 1020
        proto.bool_value = True
        proto.string_value = u'a string\u044f'
        proto.bytes_value = 'a bytes\xff\xfe'
        proto.enum_value = protorpc_test_pb2.OptionalMessage.VAL2

        return proto.SerializeToString()
示例#3
0
 def encoded_string_types(self):
     proto = protorpc_test_pb2.OptionalMessage()
     proto.string_value = u'Latin'
     return proto.SerializeToString()