Sign in
Log inSign up

What's your way of managing fake data when testing Python

John Wu's photo
John Wu
·Oct 13, 2016

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:

  1. Hard to locate when you need to reuse
  2. Hard to update when the original data structure changes

What's your way of maintaining them in tests?

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct