Jest Test Function Inside Function In Python