I’ve put together some unit tests for my custom doc type. I’ve also put together corresponding test records in test_records.json.
All the test records are inserted correctly when running unit tests for the first time. However, I have a unique field type in my custom doctype, which raises an error when running my unit tests a second time.
What’s the best way to handle test data for doctypes with unique data fields? Is there an override function for this behaviour, or is there a way to remove test records after a successful run?