Try to make fun of your functions.
Example: I have a script called users who import i18n as follows:
from webapp2_extras.i18n import gettext as _
So, in my tests, I mock this function:
from pswdless.model import PswdUserEmail, EmailUserArc from pswdless.users import FindOrCreateUser from pswdless import users
You can use the same trick with other features.
Hope this helps you.
source share