mockify.api - An all-in-one import module¶
A proxy module providing access to all publicly available classes and functions.
This module automatically imports public names from all other Mockify’s modules, so any needed class or function can be imported like this:
from mockify.api import satisfied, Mock, Return
See the list of available names below.
Rationale behind this module is that testing frameworks like PyTest provide access to all public names basically via single import, so test helper like Mockify should also provide similar behaviour. On the other hand, using a root module to do such imports is discouraged, as it would always import everything - even if the user does not want to.
Note
Since this is a proxy module, any change to other public modules will
affect this one, so f.e. removing a class from mockify.mock
module will
also remove it from mockify.api
module.
Currently available classes and functions are:
mockify.actions
mockify.actions.Action
mockify.actions.Return
mockify.actions.ReturnAsync
mockify.actions.ReturnContext
mockify.actions.ReturnAsyncContext
mockify.actions.Iterate
mockify.actions.IterateAsync
mockify.actions.YieldAsync
mockify.actions.Raise
mockify.actions.RaiseAsync
mockify.actions.Invoke
mockify.actions.InvokeAsync
New in version 0.13.