python mock function inside module