Changing Django Model Field for Hypothesis Generation
I'm testing the generation of an XML file, but it needs to conform to an encoding. I'd like to be able to simple call st.from_model(ExampleModel)
and the text fields conform to this encoding without needing to go over each and every text field.
Something like:
register_field_strategy(models.CharField, st.text(alphabet=st.characters(blacklist_categories=["C", "S"], blacklist_characters=['&'])))
I searched around but didn't find anything which could do this. Anyone have any advice on how to make something like this works?