I’m building a very simple application, every time you call
ModuleX.get(id) the system perform the folowing actions:
- Search for
- If sucess, return the id’s related value
- Otherwise create a default data structure and save it on the database under the
The problem is my docTests are failing because I use the same
id on all of them. Because of it, operations on former tests impact on the result of the later ones, because of the data was persisted
- Am I using doctests wrong?
- There is a way to perform a delete operation after each doctest?
- How did you guys would approach this problem?