def _deserialize(self, value, attr, data, **kwargs): """ Deserialize a value into a DIDDoc. Args: value: The value to deserialize Returns: The deserialized value """ return DIDDoc.deserialize(value)
async def test_make_model_conn_detail_interpolate_authn_service(self): did_doc_dict = self.make_did_doc().serialize() del did_doc_dict["authentication"] del did_doc_dict["service"] did_doc = DIDDoc.deserialize(did_doc_dict) connection_request = ConnectionRequest( connection=ConnectionDetail(did=self.test_did, did_doc=did_doc), label=self.test_label, ) data = connection_request.serialize() model_instance = ConnectionRequest.deserialize(data) assert type(model_instance) is type(connection_request)