Changeset e458b5a in flexoentity


Ignore:
Timestamp:
11/27/25 10:17:08 (7 weeks ago)
Author:
Enrico Schwass <ennoausberlin@…>
Branches:
master
Children:
9a50e0b
Parents:
0fbb01a
Message:

fix Domain and FlexoSignature and tests to reflect changes to serialization

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • flexoentity/domain.py

    r0fbb01a re458b5a  
    2626        return self.domain_id
    2727
    28     def to_dict(self):
    29         base = super().to_dict()
    30         base.update({
    31             "flexo_id": self.flexo_id,
    32             "domain_id": self.domain_id,
     28    def _serialize_content(self):
     29        return {
    3330            "fullname": self.fullname,
    3431            "description": self.description,
    3532            "classification": self.classification,
    36         })
    37         return base
    38 
     33        }
     34   
    3935    @classmethod
    4036    def from_dict(cls, data):
  • flexoentity/flexo_signature.py

    r0fbb01a re458b5a  
    7373    comment: Optional[str] = None
    7474
     75    def _serialize_content(self):
     76        return {
     77            "signed_entity": self.signed_entity,
     78            "signer_id": str(self.signer_id),
     79            "signature_data": self.signature_data,
     80            "certificate_reference": self.certificate_reference.to_dict(),
     81            "certificate_thumbprint": self.certificate_thumbprint
     82        }
     83
    7584    @property
    7685    def text_seed(self):
  • tests/conftest.py

    r0fbb01a re458b5a  
    5959        return cls()
    6060
    61     def to_dict(self):
    62         base = super().to_dict()
    63         base.update({
     61    def _serialize_content(self):
     62        return {
    6463            "text": self.text,
    6564            "options": [opt.to_dict() for opt in self.options],
    66         })
    67         return base
     65        }
    6866
    6967    @property
Note: See TracChangeset for help on using the changeset viewer.