What is Mock in python?... Why do we use Mock in Python?? Where to use Mock in python??? -------------------------------------------------------------------------------------------------------------------------- The Python Mock Module enables you to create missing objects for your designs or reproduce expensive or volatile objects for your tests. With judicious use, mocks are an invaluable part of design, development, and testing. Reasons to Mock There are times when a test resource is either unavailable or unsuitable. Perhaps the resource is being developed in parallel with the test subject. It may then be incomplete or too unstable to be reliable. The resource may be too costly. If the resource is a third-party product, its high price tag can disqualify its use for testing. Setting up the resource might be complex, taking up hardware and time that could be used elsewhere. If the resource is a data source, setting up its data set, one that mimics real-world co...
Hi, I’m Deepak Dubey. The founder of this blog. I’m a Full-stack Python Developer | OpenedX professional and part-time blogger. I’m here to write the blogs related to technology stuff like Python, Django , Open-edX, Data Science, machine Learning and many more.