title: How to use mock in python test cases of POST REST APIs. Since I want to test POST and PUT APIs in python but I couldn't move that code to production
body: <p>I am testing POST-APIs. For eg:
  url: https://dev-test/v1/add-user
  payload is
  {
  'user':'PacificPrime'
  }
  response is
  {
  result: 'user has been added'
  }</p>
  <p>How to create a test case in such a way that when code moves to production, no such user is created</p>