def test_encode_decode_with_parent_default_reader(self):
        obj = MorphingPortable.clone(create_portable())
        self.assertTrue(obj.inner_portable)

        data = self.service2.to_data(obj)
        obj2 = self.service1.to_object(data)
        self.assertTrue(obj == obj2)
    def setUp(self):
        config1 = _Config()
        config1.portable_factories = {FACTORY_ID: the_factory_1}

        config2 = _Config()
        config2.portable_factories = {FACTORY_ID: the_factory_2}

        self.service1 = SerializationServiceV1(config1)
        self.service2 = SerializationServiceV1(config2)

        base_portable = create_portable()
        data = self.service1.to_data(base_portable)

        inp = self.service2._create_data_input(data)
        portable_serializer = self.service2._registry._portable_serializer
        self.reader = portable_serializer.create_morphing_reader(inp)
    def setUp(self):
        config1 = _Config()
        config1.portable_factories = {FACTORY_ID: the_factory_1}

        config2 = _Config()
        config2.portable_factories = {FACTORY_ID: the_factory_2}

        self.service1 = SerializationServiceV1(config1)
        self.service2 = SerializationServiceV1(config2)

        base_portable = create_portable()
        data = self.service1.to_data(base_portable)

        inp = _ObjectDataInput(data.buffer, DATA_OFFSET, self.service2,
                               self.service2._is_big_endian)
        portable_serializer = self.service2._registry._portable_serializer
        self.reader = portable_serializer.create_morphing_reader(inp)