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

Viewed 13

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' }

How to create a test case in such a way that when code moves to production, no such user is created

0 Answers
Related