unittest.mock
standard module.fake()
and restore()
.self.fake(feature)
and then restore it to the real feature behaviour by calling self.restore(feature)
. When a feature is mocked the real behaviour won't be called, instead a quick and simple implementation is ran, often offering the ability to inspect and test what happens.unittest.mock
module. You can find more information in unittest documentation.responses
module. You can find more information in responses documentation.