Refactoring some Unittests and Added Python UTs for lucas_lehmer