change test function to unittest module