Add support for model object anonymization
Simply add a BaseModel.anonymize() method. Default implementation returns None, meaning the object is not anonymizable. For Person, the method returns a Person whith hashed fullname (and unset name and email). For Revision and Release, the method returns an anonymized version of the object, i.e. with instance of Person replaced by anonymized ones.
parent
cce30366
No related branches found
No related tags found
Showing
- swh/model/hypothesis_strategies.py 7 additions, 4 deletionsswh/model/hypothesis_strategies.py
- swh/model/model.py 38 additions, 1 deletionswh/model/model.py
- swh/model/tests/test_hypothesis_strategies.py 8 additions, 0 deletionsswh/model/tests/test_hypothesis_strategies.py
- swh/model/tests/test_model.py 31 additions, 0 deletionsswh/model/tests/test_model.py
Loading
-
mentioned in merge request !113 (closed)
-
mentioned in merge request !114 (closed)
Please register or sign in to comment