Skip to main content

Posts

Showing posts from December 9, 2015
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