What's your way of managing fake data when testing Python
In python test we always need to create some fake data or mock subjects with unittest.mock
. As the codebase grows bigger we might have thousands of those fake data so it becomes hard to manage. More specifically:
- Hard to locate when you need to reuse
- Hard to update when the original data structure changes
What's your way of maintaining them in tests?